vscode-kotlin icon indicating copy to clipboard operation
vscode-kotlin copied to clipboard

fs.mkdir isn't recursive and download fails

Open blues-man opened this issue 4 years ago • 0 comments

Describe the bug Hello, I'm trying to add this extension as Kotlin plugin for Eclipse Che using Eclipse Theia supporting VSCode extensions, but I can't have it working because download of extension is failing due this code snippet can't create recursively the path: https://github.com/fwcd/vscode-kotlin/blob/bd965d60fc20a08a32d80f3466c6227dd1b221aa/src/serverDownloader.ts#L61

Error I get is:

Activating extension 'Kotlin' failed: ENOENT: no such file or directory,
mkdir '/home/theia/home/theia/fwcd.kotlin'

so context.defaultGlobalStorage lands to /home/theia/home/theia, while only /home/theia exists.

Shoudn't fs.mkdir with recursive=true create it anyway? https://nodejs.org/dist/latest-v10.x/docs/api/fs.html#fs_fs_mkdir_path_options_callback

Is there any way to pass the installDir as parameter from package.json ? To Reproduce PR open with all details and how to reproduce it: https://github.com/eclipse/che-plugin-registry/pull/611

Expected behavior ServerDownloader.installDir is created on Eclipse Che using this VSCode extension

Extension version 0.2.18

blues-man avatar Sep 10 '20 15:09 blues-man