Skip to content

fs.mkdir isn't recursive and download fails #50

@blues-man

Description

@blues-man

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:

await fs.promises.mkdir(this.installDir, { recursive: true });

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:
eclipse-che/che-plugin-registry#611

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

Extension version
0.2.18

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions