diff --git a/lib/shadow/link.cjs b/lib/shadow/link.cjs index c434966f..b418cfbe 100644 --- a/lib/shadow/link.cjs +++ b/lib/shadow/link.cjs @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -const { chmodSync, realpathSync } = require('fs') +const { realpathSync } = require('fs') const path = require('path') const which = require('which') @@ -23,12 +23,14 @@ function installLinks (realDirname, binname) { } return !isShadow }) + if (npmpath && process.platform === 'win32') { + return npmpath + } if (!npmpath) { console.error('Socket unable to locate npm ensure it is available in the PATH environment variable') process.exit(127) } if (shadowIndex === -1) { - chmodSync(realNpmShadowBinDir, parseInt('755', 8)) const bindir = path.join(realDirname) process.env['PATH'] = `${ bindir diff --git a/package.json b/package.json index 72b194ba..f48f0dc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@socketsecurity/cli", - "version": "0.5.2", + "version": "0.5.3", "description": "CLI tool for Socket.dev", "homepage": "http://github.com/SocketDev/socket-cli-js", "repository": { @@ -31,7 +31,6 @@ "lib/shadow/**" ], "scripts": { - "echo": "echo $PATH", "check:dependency-check": "dependency-check '*.js' 'lib/shadow/*.cjs' '*.mjs' 'test/**/*.js' --no-dev", "check:installed-check": "installed-check -i eslint-plugin-jsdoc", "check:lint": "eslint --report-unused-disable-directives .",