{"name":"v18.6.1","message":"Version v18.6.1","target":"d9f4b2db561cf6f53af92100ff92661af62fa548","commit":{"id":"b5e9c6d04ecb017785f6d475dbc88868c7ff7fc1","short_id":"b5e9c6d0","created_at":"2025-11-20T22:34:41.000-08:00","parent_ids":["3a847532c33b6fe2a331a651a6f53be1b2ebed79"],"title":"Fix shell executor not working with variables that use file variables","message":"Fix shell executor not working with variables that use file variables\n\nWhen using the shell executor, file variables that reference other\nfile variables (e.g., MY_FILE_VAR: $FILE_TEST) were incorrectly\ngetting a $PWD/ prefix, resulting in paths like:\n\n$PWD/$FILE_TEST\n\nThis caused \"No such file or directory\" errors because the shell would\nnot expand the nested variable reference correctly.\n\nThe root cause was that the shell executor was using relative paths for\nBuildDir (e.g., \"builds/...\") instead of absolute paths. This caused the\nfollowing chain of issues:\n\n1. TmpProjectDir() returns a relative path\n2. When creating file variables, TmpFile() -\u003e Absolute() prepends\n   $PWD/ to relative paths\n3. File variables get paths like $PWD/builds/.../FILE_TEST\n4. When MY_FILE_VAR: $FILE_TEST is processed, the literal string\n   $FILE_TEST doesn't match the temp file check\n5. It also goes through Absolute() and becomes $PWD/$FILE_TEST\n\nThe fix ensures DefaultBuildsDir and DefaultCacheDir are converted\nto absolute paths during the Prepare() phase by joining them with\nthe current working directory if they are relative.\n\nThis makes the shell executor behavior consistent with the Docker\nexecutor, which already uses absolute paths.\n\nThis was a regression introduced by\nhttps://gitlab.com/gitlab-org/gitlab-runner/-/merge_requests/5912.\n\nRelates to https://gitlab.com/gitlab-org/gitlab-runner/-/issues/39124\n\nChangelog: fixed\n","author_name":"Stan Hu","author_email":"stanhu@gmail.com","authored_date":"2025-11-20T12:29:58.000-08:00","committer_name":"Stan Hu","committer_email":"stanhu@gmail.com","committed_date":"2025-11-20T22:34:41.000-08:00","trailers":{},"extended_trailers":{},"web_url":"https://gitlab.com/gitlab-org/gitlab-runner/-/commit/b5e9c6d04ecb017785f6d475dbc88868c7ff7fc1"},"release":{"tag_name":"v18.6.1","description":"See [the changelog](https://gitlab.com/gitlab-org/gitlab-runner/blob/v18.6.1/CHANGELOG.md) :rocket:\n\nGitLab Runner documentation can be found at https://docs.gitlab.com/runner/.\n"},"protected":true,"created_at":"2025-11-21T14:50:23.000Z"}