marklogic-contentpump icon indicating copy to clipboard operation
marklogic-contentpump copied to clipboard

Powershell doesn't receive the error code

Open wolojo opened this issue 4 years ago • 0 comments

Important note: This works correct in a windows command prompt, but not in PowerShell.

Steps to reproduce: Run the following two commands in PowerShell:

mlcp
$LASTEXITCODE

The first command prints the usage, the last one the error code (or exit code)

Expected output: 1 Actual output: 0

OS: Windows 10 MLCP: 10.0.4.2

Suggested fix. Add a the following command to the end of the bat file:

exit /B %errorlevel%

wolojo avatar Jan 05 '21 13:01 wolojo