Build occasionally get "No such file or directory" accessing build directory
## Overview Every couple of builds (it not common but maybe 1 in 10 builds) will get an error when the runner starts: ``` /bin/bash: line 20: cd: /builds/GROUP/Project: No such file or directory ``` I am using the docker executor. Are there any ideas why occasionally this directory will not be available? Neither the build log or runner logs show anything else out of the ordinary. ### Workaround As explained in https://gitlab.com/gitlab-org/gitlab-runner/issues/4449#note_189923147 and https://gitlab.com/gitlab-org/gitlab-runner/issues/4449#note_189959431 https://gitlab.com/gitlab-org/gitlab-runner/issues/1379#note_220176045 https://gitlab.com/gitlab-org/gitlab-runner/issues/1379#note_204389790 this is because of the default content of `~/.bash_loguout` below: ``` if [ "$SHLVL" = 1 ]; then [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q fi ``` ## Proposal MR [1523](https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1523) from @ubarbaxor is currently being investigated as a potential solution for this issue. We will target the 12.7 release milestone for resolving this issue, depending on the progress made in advancing that MR. In https://gitlab.com/gitlab-org/gitlab-runner/issues/4449 we are also [discussing](https://gitlab.com/gitlab-org/gitlab-runner/issues/4449#note_252473311) possible solutions. Update documentation for the shell and ssh executor to make it clear that we load the user profile. Update https://docs.gitlab.com/runner/faq/README.html to include this as a common error. ## Merge requests - [Update error message and documentation](https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1915) - [Disalbe skel populatation for GitLabRunner user](https://gitlab.com/gitlab-org/gitlab-runner/merge_requests/1523) - [Fix comment on post-install script](https://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/1959)
issue