pinokiod 2.15.4 → 2.15.6
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.
- package/kernel/bin/index.js +3 -0
- package/kernel/shell.js +5 -2
- package/kernel/shells.js +2 -0
- package/package.json +1 -1
package/kernel/bin/index.js
CHANGED
package/kernel/shell.js
CHANGED
|
@@ -189,8 +189,11 @@ class Shell {
|
|
|
189
189
|
if (!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(key) && key !== "ProgramFiles(x86)") {
|
|
190
190
|
delete this.env[key]
|
|
191
191
|
}
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
let val = this.env[key]
|
|
193
|
+
if (/[\r\n]/.test(val) {
|
|
194
|
+
const replaced = val.replaceAll(/[\r\n]+/g, ' ');
|
|
195
|
+
this.env[key] = replaced
|
|
196
|
+
// delete this.env[key]
|
|
194
197
|
}
|
|
195
198
|
}
|
|
196
199
|
|
package/kernel/shells.js
CHANGED
|
@@ -28,7 +28,9 @@ class Shells {
|
|
|
28
28
|
*/
|
|
29
29
|
async launch(params, options, ondata) {
|
|
30
30
|
// iterate through all the envs
|
|
31
|
+
console.log("------- params.env before", JSON.stringify(params.env, null, 2))
|
|
31
32
|
params.env = this.kernel.bin.envs(params.env)
|
|
33
|
+
console.log("------- params.env after", JSON.stringify(params.env, null, 2))
|
|
32
34
|
|
|
33
35
|
let exec_path = (params.path ? params.path : ".") // use the current path if not specified
|
|
34
36
|
let cwd = (options && options.cwd ? options.cwd : this.kernel.homedir) // if cwd exists, use it. Otherwise the cwd is pinokio home folder (~/pinokio)
|