diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7944e9e --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +### [1.4.3](https://github.com/isaacs/spawn-wrap/compare/v1.4.2...v1.4.3) (2019-08-23) + + +### Bug Fixes + +* **win32:** handle cases where "node" is quoted ([#102](https://github.com/isaacs/spawn-wrap/issues/102)) ([aac8730](https://github.com/isaacs/spawn-wrap/commit/aac8730)) diff --git a/index.js b/index.js index 908be7f..2884d34 100644 --- a/index.js +++ b/index.js @@ -134,8 +134,13 @@ function setup(argv, env) { const cmdShim = '@echo off\r\n' + 'SETLOCAL\r\n' + + 'CALL :find_dp0\r\n' + 'SET PATHEXT=%PATHEXT:;.JS;=;%\r\n' + '"' + process.execPath + '" "%~dp0\\.\\node" %*\r\n' + 'EXIT /b %errorlevel%\r\n'+ + ':find_dp0\r\n' + + 'SET dp0=%~dp0\r\n' + + 'EXIT /b\r\n' fs.writeFileSync(path.join(workingDir, 'node.cmd'), cmdShim) fs.chmodSync(path.join(workingDir, 'node.cmd'), '0755') diff --git a/package-lock.json b/package-lock.json index 7638ed5..4dee9f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "spawn-wrap", - "version": "1.4.2", + "version": "1.4.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index caa67a4..3f729eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "spawn-wrap", - "version": "1.4.2", + "version": "1.4.3", "description": "Wrap all spawned Node.js child processes by adding environs and arguments ahead of the main JavaScript file argument.", "main": "index.js", "engines": {