Skip to content

Commit

Permalink
fix: takeown Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hrenaud committed Oct 11, 2024
1 parent bd54aad commit 98505ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/handlers/initHandlers/plugin_canInstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const initSudoFixNpmDirRights = (
const libPath = path.join(`lib`, `node_modules`)
let cmd = ``
if (os.platform() === 'win32') {
cmd = `mkdir $(npm config get prefix)\\\\${libPath} && chown -R $USER $(npm config get prefix)/{${libPath},bin,share} && echo "Done"`
cmd = `mkdir $(npm config get prefix)\\${libPath} && TAKEOWN -F $(npm config get prefix)\\${libPath} /R && TAKEOWN -F $(npm config get prefix)\\bin /R && TAKEOWN -F $(npm config get prefix)\\share /R && echo "Done"`
} else {
cmd = `mkdir -p $(npm config get prefix)/${libPath} && chown -R $USER $(npm config get prefix)/{${libPath},bin,share} && echo "Done"`
}
Expand Down

0 comments on commit 98505ae

Please sign in to comment.