pinokiod 1.3.79 → 1.3.80

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.
@@ -88,16 +88,25 @@ create_default_packages:
88
88
  ondata({ raw: `running installer: ${installer}...\r\n` })
89
89
 
90
90
  let cmd
91
+ let is_sudo
91
92
  if (this.kernel.platform === "win32") {
92
- cmd = `start /wait ${installer} /InstallationType=JustMe /RegisterPython=0 /S /D=${install_path}`
93
+ is_sudo = false
94
+ cmd = `start /wait ${path.resolve(install_path, installer)} /InstallationType=JustMe /RegisterPython=0 /S /D=${install_path}`
93
95
  } else {
96
+ is_sudo = true
94
97
  cmd = `bash ${installer} -b -p ${install_path}`
95
98
  }
96
99
  ondata({ raw: `${cmd}\r\n` })
97
100
  ondata({ raw: `path: ${this.kernel.bin.path()}\r\n` })
98
- await this.kernel.bin.exec({ sudo: true, message: cmd, conda: { skip: true } }, (stream) => {
99
- ondata(stream)
100
- })
101
+ if (is_sudo) {
102
+ await this.kernel.bin.exec({ sudo: true, message: cmd, conda: { skip: true } }, (stream) => {
103
+ ondata(stream)
104
+ })
105
+ } else {
106
+ await this.kernel.bin.exec({ message: cmd, conda: { skip: true } }, (stream) => {
107
+ ondata(stream)
108
+ })
109
+ }
101
110
  //// await this.activate()
102
111
  // await fs.promises.writeFile(this.kernel.bin.path('miniconda/condarc'), `channels:
103
112
  // - conda-forge
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.3.79",
3
+ "version": "1.3.80",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {