Skip to content

Embedded Node installation fails on Windows with non-writable install location #2106

@lorenzodallavecchia

Description

@lorenzodallavecchia

I found out that WWD is not installing the correct embedded Node on Windows when Eclipse is installed in a directory that is writable only by Administrators, such as C:\Program Files.

I think the problem is when NodeJSManager probes valid install locations.

if (directory.exists() && directory.isDirectory()
            && directory.canWrite() && directory.canExecute()) {
        return true;
}

In Windows, canWrite does not check the actual ACL but only the "read-only" flag of the directory.

The solution seems quite simple: use the NIO isWritable method.

java.nio.file.Files.isWritable(directory.toPath())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions