Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning if explicit shell is not set #374

Open
jayvdb opened this issue Nov 1, 2023 · 2 comments
Open

Warning if explicit shell is not set #374

jayvdb opened this issue Nov 1, 2023 · 2 comments

Comments

@jayvdb
Copy link

jayvdb commented Nov 1, 2023

I've encountered that github actions uses sh as the shell even when bash is on the worker image, unless shell: bash is explicitly added, either for the step or using the defaults https://docs.github.com/en/actions/using-jobs/setting-default-values-for-jobs#example-set-the-default-shell-and-working-directory

IMO it would be useful for actionlint to check whether there is an explicit shell set for any step which uses run, so that the language for the script is known.

@michaelvoet
Copy link

michaelvoet commented Nov 16, 2023

Here's evidence of this issue:

- name: Print default shell
   run: |
     ps -p $$
- name: Print bash shell
   shell: bash
   run: |
     ps -p $$

image

@fclante
Copy link

fclante commented Apr 15, 2024

This is a real issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants