Skip to content

Commit

Permalink
Put the nix store paths first (in the PATH)
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamc committed Nov 14, 2024
1 parent 5aaffa6 commit d32de47
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
7 changes: 3 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -863,15 +863,15 @@ class NixInstallerAction extends DetSysAction {
async setGithubPath(): Promise<void> {
// Interim versions of the `nix-installer` crate may have already manipulated `$GITHUB_PATH`, as root even! Accessing that will be an error.
try {
const paths = [
"/nix/var/nix/profiles/default/bin",
`${process.env["HOME"]}/.nix-profile/bin`,
];
const paths = [];

if (this.determinate) {
paths.push("/usr/local/bin");
}

paths.push("/nix/var/nix/profiles/default/bin");
paths.push(`${process.env["HOME"]}/.nix-profile/bin`);

for (const p of paths) {
actionsCore.addPath(p);
actionsCore.debug(`Added \`${p}\` to \`$GITHUB_PATH\``);
Expand Down

0 comments on commit d32de47

Please sign in to comment.