()
| 160 | } |
| 161 | |
| 162 | async function getExtensionsDir(): Promise<string> { |
| 163 | const name = 'vscode_jupyter_exts'; |
| 164 | const extDirPath = path.join(tmp.tmpdir, name); |
| 165 | if (fs.existsSync(extDirPath)) { |
| 166 | return extDirPath; |
| 167 | } |
| 168 | |
| 169 | return new Promise<string>((resolve, reject) => { |
| 170 | tmp.dir({ name, keep: true }, (err, dir) => { |
| 171 | if (err) { |
| 172 | return reject(err); |
| 173 | } |
| 174 | resolve(dir); |
| 175 | }); |
| 176 | }); |
| 177 | } |
| 178 | |
| 179 | async function start() { |
| 180 | const platform = computePlatform(); |