Skip to content

Commit

Permalink
More handling around old nix-installer versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoverbear committed Jul 14, 2023
1 parent b6d507a commit 15d6a6a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
11 changes: 8 additions & 3 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,20 @@ class NixInstallerAction {
if (typeof github_path === "string") {
try {
access(github_path);
} catch {
} catch (error) {
actions_core.info(
"Skipping setting $GITHUB_PATH in action, as `nix-installer` crate did it already",
);
}
}
actions_core.addPath("/nix/var/nix/profiles/default/bin");
actions_core.addPath(`${process.env.HOME}/.nix-profile/bin`);
try {
actions_core.addPath("/nix/var/nix/profiles/default/bin");
actions_core.addPath(`${process.env.HOME}/.nix-profile/bin`);
} catch (error) {
actions_core.error(
`Attempt to set \`$GITHUB_PATH\` failed, \`nix\` may not be available on future steps: ${error}`,
);
}
}

async execute_uninstall(): Promise<number> {
Expand Down

0 comments on commit 15d6a6a

Please sign in to comment.