Fix use of UID where username should be on Github actions (#157)

* Fix use of UID where username should be on Github actions

* Add check to ensure that nix profile add works

* It's nix profile install, ana
This commit is contained in:
Ana Hobden 2023-01-05 07:56:09 -08:00 committed by GitHub
parent ab00af7924
commit cefc927ff5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 4 deletions

View file

@ -140,7 +140,12 @@ jobs:
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: nix run nixpkgs#fortune
run: |
nix run nixpkgs#fortune
nix profile install nixpkgs#fortune
fortune
nix store gc
nix run nixpkgs#fortune
- name: Test bash
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
@ -250,7 +255,12 @@ jobs:
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: nix run nixpkgs#fortune
run: |
nix run nixpkgs#fortune
nix profile install nixpkgs#fortune
fortune
nix store gc
nix run nixpkgs#fortune
- name: Test bash
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()
@ -355,7 +365,12 @@ jobs:
run: echo $PATH
- name: Test `nix` with `$GITHUB_PATH`
if: success() || failure()
run: nix run nixpkgs#fortune
run: |
nix run nixpkgs#fortune
nix profile install nixpkgs#fortune
fortune
nix store gc
nix run nixpkgs#fortune
- name: Test bash
run: nix-instantiate -E 'builtins.currentTime' --eval
if: success() || failure()

View file

@ -120,7 +120,7 @@ impl ConfigureShellProfile {
if let Ok(Some(runner)) = User::from_name("runner") {
buf += &format!(
"/nix/var/nix/profiles/per-user/{}/profile/bin\n",
runner.uid
runner.name
);
}
create_or_append_files