nicojs / node-link-parent-bin

A tool to link the bins of the your npm dependencies to child packages in a node multi-package repository
43 stars 11 forks source link

fix: Update cmd-shim package #21

Closed mtdewers closed 3 years ago

mtdewers commented 4 years ago

Fix for issue #20. Updated the cmd-shim package and that causes the correct exit code handling to be emitted in the various files.

Before :

@SETLOCAL

@IF EXIST "%~dp0\node.exe" (
  @SET "_prog=%~dp0\node.exe"
) ELSE (
  @SET "_prog=node"
  @SET PATHEXT=%PATHEXT:;.JS;=;%
)

"%_prog%"  "%~dp0\..\..\..\..\node_modules\hello-single-binary-dependency\hello-single-binary-dependency" %*
@ENDLOCAL

After:

@ECHO off
SETLOCAL
CALL :find_dp0

IF EXIST "%dp0%\node.exe" (
  SET "_prog=%dp0%\node.exe"
) ELSE (
  SET "_prog=node"
  SET PATHEXT=%PATHEXT:;.JS;=;%
)

"%_prog%"  "%dp0%\..\..\..\..\node_modules\hello-single-binary-dependency\hello-single-binary-dependency" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b
nicojs commented 3 years ago

Since then fixed.