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

/usr/bin/bash missing on Ubuntu 22.04 images #130

Closed
etu opened this issue Dec 7, 2022 · 3 comments
Closed

/usr/bin/bash missing on Ubuntu 22.04 images #130

etu opened this issue Dec 7, 2022 · 3 comments

Comments

@etu
Copy link

etu commented Dec 7, 2022

I run CI of my nixos config using ubuntu-latest images here on GitHub. Yesterday I had a job running and it was fine, but tonight my overnight job failed.

It failed with the following error:

Cachix: installing
  /usr/bin/bash -c nix-env --quiet -j8 -iA cachix -f https://cachix.org/api/v1/install
  warning: unknown setting 'experimental-features'
  error: could not set permissions on '/nix/var/nix/profiles/per-user' to 755: Operation not permitted
  Error: Action failed with error: Error: The process '/usr/bin/bash' failed with exit code 1

Failed build: https://github.com/etu/nixconfig/actions/runs/3635609278/jobs/6134858130
Successful build yesterday: https://github.com/etu/nixconfig/actions/runs/3629375898/jobs/6121504673

So I thought that was a bit curious. So I looked at the environment because I have my nix version pinned and all imported actions are pinned to specific versions.

So yesterday I had a successful run with cachix-action@v12 with the following environment:

Current runner version: '2.299.1'
Operating System
  Ubuntu
  20.04.5
  LTS
Runner Image
  Image: ubuntu-20.04
  Version: 20221125.1
  Included Software: https://github.com/actions/runner-images/blob/ubuntu20/20221125.1/images/linux/Ubuntu2004-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu20%2F20221125.1

And tonight's failed run with the following environment:

Current runner version: '2.299.1'
Operating System
  Ubuntu
  22.04.1
  LTS
Runner Image
  Image: ubuntu-22.04
  Version: 20221204.2
  Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20221204.2/images/linux/Ubuntu2204-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20221204.2

To me this place looks like a place where it could go wrong:

await exec.exec('bash', ['-c', installCommand]);
but I'm not sure why that would expand to be /usr/bin/bash if it doesn't exist? Or... maybe they dropped it? Maybe it should refer to sh or ash instead?

@F-WRunTime
Copy link

F-WRunTime commented Dec 8, 2022

We are experiencing this issue as well with our CI workflows installing nix on the latest ubuntu 22.04 runners

@l0b0
Copy link

l0b0 commented Dec 8, 2022

Unless there's any specific shell syntax in there like a pipe or redirect, we should be able to exec just the installCommand without a shell. The default install command looks like it doesn't need a shell, but I'm not sure what core.getInput('installCommand') could be.

@domenkozar
Copy link
Member

This is a dupe of cachix/install-nix-action#148

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

4 participants