fix(jenkins): preserve powershell script encoding
This commit is contained in:
@@ -12,6 +12,8 @@ if not exist "%GENARRATIVE_POWERSHELL%" (
|
||||
echo [jenkins-powershell] user:
|
||||
whoami
|
||||
echo [jenkins-powershell] exe: %GENARRATIVE_POWERSHELL%
|
||||
"%GENARRATIVE_POWERSHELL%" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command "$path = '%CD%\\${scriptPath}'; $text = [System.IO.File]::ReadAllText($path, [System.Text.Encoding]::UTF8); $utf8Bom = New-Object System.Text.UTF8Encoding($true); [System.IO.File]::WriteAllText($path, $text, $utf8Bom)"
|
||||
if errorlevel 1 exit /b %ERRORLEVEL%
|
||||
"%GENARRATIVE_POWERSHELL%" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Bypass -File "%CD%\\${scriptPath}"
|
||||
exit /b %ERRORLEVEL%
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user