More handling around old nix-installer versions
This commit is contained in:
parent
b6d507aa32
commit
15d6a6a814
11
dist/index.js
vendored
11
dist/index.js
vendored
|
@ -265,12 +265,17 @@ class NixInstallerAction {
|
|||
try {
|
||||
(0, promises_1.access)(github_path);
|
||||
}
|
||||
catch (_a) {
|
||||
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}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
execute_uninstall() {
|
||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
12
src/main.ts
12
src/main.ts
|
@ -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> {
|
||||
|
|
Loading…
Reference in a new issue