Skip to content

don't lock the dprint executable when the LSP is running #88

Open
@DetachHead

Description

@DetachHead

when the dprint vscode extension is running, it locks the executable, which means the user can't update dprint while vscode is open:

npm error code EPERM
npm error syscall unlink
npm error path C:\Users\user\project\node_modules\dprint\dprint.exe
npm error errno -4048
npm error [Error: EPERM: operation not permitted, unlink 'C:\Users\user\project\node_modules\dprint\dprint.exe'] {
npm error   errno: -4048,
npm error   code: 'EPERM',
npm error   syscall: 'unlink',
npm error   path: 'C:\\Users\\user\\project\\node_modules\\dprint\\dprint.exe'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It's possible that the file was already in use (by a text editor or antivirus),
npm error or that you lack permissions to access it.
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.

a possible solution could be for the extension to create a temporary copy of the executable and launch that instead, which is what my extension does to work around the same issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions