pinokiod 3.328.0 → 3.329.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/kernel/shell.js +4 -5
  2. package/package.json +1 -1
package/kernel/shell.js CHANGED
@@ -167,11 +167,10 @@ class Shell {
167
167
  let app_env = await Environment.get(api_path, this.kernel)
168
168
  this.env = Object.assign(this.env, app_env)
169
169
  }
170
- let PATH_KEY;
171
- if (this.env.Path) {
172
- PATH_KEY = "Path"
173
- } else if (this.env.PATH) {
174
- PATH_KEY = "PATH"
170
+ let PATH_KEY = Object.keys(this.env).find((key) => key.toLowerCase() === "path") || "PATH";
171
+ if (!this.env[PATH_KEY]) {
172
+ // fall back to whichever casing exists so we don't end up writing to an undefined key
173
+ this.env[PATH_KEY] = this.env.Path || this.env.PATH || this.env.path;
175
174
  }
176
175
  if (this.shell === "cmd.exe") {
177
176
  // ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "3.328.0",
3
+ "version": "3.329.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {