Skip to content

Commit

Permalink
sys:es: update node.path var
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Giannini authored and Matthew Giannini committed Nov 19, 2024
1 parent a43f9c0 commit 3a340ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sys/es/fan/BootEnv.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ class BootEnv extends Env {
// set some pre-defined vars
if (Env.__isNode()) {
let path = Env.__node("path");
let url = Env.__node("url");
this.#vars.set("os.name", this.os());
this.#vars.set("os.version", Env.__node()?.os?.version());
this.#vars.set("node.version", process.versions.node);
this.#vars.set("node.path", path.dirname(process.execPath).replaceAll(path.sep, path.posix.sep));
// this assumes that sys.js is in {node.path}/<some_dir>/sys.js
this.#vars.set("node.path", path.resolve(url.fileURLToPath(import.meta.url), "../.."));
}

for (let i=0; i<keys.length; ++i) {
Expand Down

0 comments on commit 3a340ef

Please sign in to comment.