Detect whether we're running in a Namespace runner, and if so, set init: none #52

Merged
hugosantos merged 1 commit from main into main 2023-11-02 15:58:38 +00:00
3 changed files with 12 additions and 1 deletions

4
dist/index.js vendored
View file

@ -189,6 +189,10 @@ class NixInstallerAction {
_actions_core__WEBPACK_IMPORTED_MODULE_0__.info("Detected `$ACT` environment, assuming this is a https://github.com/nektos/act created container, set `NOT_ACT=true` to override this. This will change the setting of the `init` to be compatible with `act`");
execution_env.NIX_INSTALLER_INIT = "none";
}
if (process.env.NSC_VM_ID && !process.env.NOT_NAMESPACE) {
_actions_core__WEBPACK_IMPORTED_MODULE_0__.info("Detected Namespace runner, assuming this is a https://namespace.so created container, set `NOT_NAMESPACE=true` to override this. This will change the setting of the `init` to be compatible with Namespace");
execution_env.NIX_INSTALLER_INIT = "none";
}
return execution_env;
}
async execute_install(binary_path) {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -239,6 +239,13 @@ class NixInstallerAction {
execution_env.NIX_INSTALLER_INIT = "none";
}
if (process.env.NSC_VM_ID && !process.env.NOT_NAMESPACE) {
actions_core.info(
"Detected Namespace runner, assuming this is a https://namespace.so created container, set `NOT_NAMESPACE=true` to override this. This will change the setting of the `init` to be compatible with Namespace",
);
execution_env.NIX_INSTALLER_INIT = "none";
}
return execution_env;
}