clicommand/agent_start.go: Use /usr/bin/env bash as default shell#3661
Merged
zhming0 merged 1 commit intobuildkite:mainfrom Jan 13, 2026
Merged
clicommand/agent_start.go: Use /usr/bin/env bash as default shell#3661zhming0 merged 1 commit intobuildkite:mainfrom
/usr/bin/env bash as default shell#3661zhming0 merged 1 commit intobuildkite:mainfrom
Conversation
Use `/usr/bin/env bash` rather than `/bin/bash` to locate bash for the default shell in a Linux agent. This improves portability for running agents on NixOS and GNU Guix hosts, where /bin/bash is not present, but /usr/bin/env is present.
This was referenced Jan 13, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Use
/usr/bin/env bashrather than/bin/bashto locate bash for the default shell in a Linux agent.This improves portability for running agents on NixOS and GNU Guix hosts, where /bin/bash is not present, but /usr/bin/env is present.
Context
"Hello world" builds failed on an agent running on GNU Guix, and presumably it would also fail on NixOS for the same reason:
Changes
Uses
/usr/bin/env bashto instantiate the bash shell based on the $PATH rather than presuming/bin/bashThe presence of
/usr/bin/envat that location is a de-facto standard which can be relied on for portability.Testing
go test ./...). Buildkite employees may check this if the pipeline has run automatically.go tool gofumpt -extra -w .)Disclosures / Credits
I did not use AI tools at all