pinokiod 1.1.21 → 1.1.23

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/sysinfo.js +22 -1
  2. package/package.json +1 -1
package/kernel/sysinfo.js CHANGED
@@ -102,8 +102,29 @@ class Sysinfo {
102
102
  }
103
103
  let res = await this.kernel.bin.exec({ message: cmd, conda: "base" }, (stream) => {
104
104
  })
105
+ let lines = res.response.split(/[\r\n]+/)
106
+ let vars = []
107
+ let started
108
+ for(let line of lines) {
109
+ if (started) {
110
+ // end BEFORE the next occurrence of <<PINOKIO SHELL>>
111
+ if (/<<PINOKIO SHELL>>/.test(line)) {
112
+ // do nothing => ignore this line
113
+ } else {
114
+ vars.push(line)
115
+ }
116
+ } else {
117
+ // start AFTER the first occurrence of <<PINOKIO SHELL>>
118
+ if (/<<PINOKIO SHELL>>/.test(line)) {
119
+ started = true
120
+ }
121
+ }
122
+ }
123
+
124
+
105
125
  this.info.env = process.env
106
- this.info.shell_env = res.response
126
+ //this.info.shell_env = vars
127
+ this.info.shell_env = lines
107
128
  }
108
129
  }
109
130
  module.exports = Sysinfo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.1.21",
3
+ "version": "1.1.23",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {