Is there a way to set a default environment or profile for the default bash shell?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
From what I can tell, the runner will use a default set of bash arguments including --norcfile and --noprofile, which means it won't load any Shell scripts like nvm or tfenv.
I see it's possible to override the shell invocation per-workflow, but what I really would like is some way to set the default shell invocation globally from within a runner so that we can get a fully initialized login/rc shell, in order to be able to use these tools easily, e.g. run: nvm exec 14.17.3 ci.js.
Specifically to our use case we have several of these *env tools in the /etc/profile which works fine as long as bash is invoked normally, but of course without the login/profile processing, the shims PATHs aren't set and the function based commands (nvm) don't exist.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the runner chooses the default bash arguments, especially the --norcfile and --noprofile behavior, and compare that with the per-workflow shell override. Done means a documented runner-level way to select login/profile initialization globally, with the behavior verified for tools configured through /etc/profile such as nvm and tfenv.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, github-actions
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100