tag:help.appveyor.com,2012-11-13:/discussions/problems/7256-powershell-script-that-launches-nmake-loses-logsAppVeyor: Discussion 2018-08-25T02:19:13Ztag:help.appveyor.com,2012-11-13:Comment/431532192017-08-07T19:20:18Z2017-08-07T19:20:18ZPowershell Script That Launches nmake Loses Logs<div><p>You probably have to change <code>binary</code> to <code>binaries</code> <a href="https://github.com/bgaifullin/libxml2-win-binaries/blob/master/build.ps1#L75">here</a></p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/431532192017-08-08T16:56:58Z2017-08-09T19:09:05ZPowershell Script That Launches nmake Loses Logs<div><p>I am sorry, but I didn't get how this will help with swallowing nmake output. :(</p></div>gaifullinbftag:help.appveyor.com,2012-11-13:Comment/431532192017-08-08T22:18:04Z2017-08-08T22:18:04ZPowershell Script That Launches nmake Loses Logs<div><p>Sorry, I concentrated on specific wrong path related error. Output is not being visible because you are using <code>Start-Process</code> to execute <code>nmake</code>. AppVeyor runs custom PowerShell host and behavior is not exactly the same as if you run PowerShell console interactively. I would recommend to use <code>cmd /c</code> instead.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/431532192017-08-09T19:14:53Z2017-08-09T19:14:55ZPowershell Script That Launches nmake Loses Logs<div><p>I put 3 comments, but nothing is changed. :(</p></div>gaifullinbftag:help.appveyor.com,2012-11-13:Comment/431532192017-08-09T19:42:33Z2017-08-09T19:42:33ZPowershell Script That Launches nmake Loses Logs<div><p>Could you please clarify what comments are you about?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/431532192017-08-09T19:55:55Z2017-08-09T19:55:56ZPowershell Script That Launches nmake Loses Logs<div><p>I added comments, that 'cmd /c' does not work.<br>
It fails without any informative message.</p></div>gaifullinbftag:help.appveyor.com,2012-11-13:Comment/431532192017-08-09T20:03:19Z2017-08-09T20:03:19ZPowershell Script That Launches nmake Loses Logs<div><p>Could you please share a link to specific failed build?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/431532192017-08-09T20:39:23Z2017-08-09T20:39:24ZPowershell Script That Launches nmake Loses Logs<div><p>Sure. <a href="https://ci.appveyor.com/project/bgaifullin/libxml2-win-binaries/build/1.0.48">https://ci.appveyor.com/project/bgaifullin/libxml2-win-binaries/bui...</a></p></div>gaifullinbftag:help.appveyor.com,2012-11-13:Comment/431532192017-08-09T20:56:17Z2017-08-09T20:56:17ZPowershell Script That Launches nmake Loses Logs<div><p>Can you please remove <code>$ErrorActionPreference = "Stop"</code> <a href="https://github.com/bgaifullin/libxml2-win-binaries/blob/master/build.ps1#L19">here</a> to see more details on that error?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/431532192017-08-09T21:13:28Z2017-08-09T21:13:29ZPowershell Script That Launches nmake Loses Logs<div><p>Sure.<br>
<a href="https://ci.appveyor.com/project/bgaifullin/libxml2-win-binaries/build/1.0.51">https://ci.appveyor.com/project/bgaifullin/libxml2-win-binaries/bui...</a></p>
<pre>
<code>DEBUG: 42+ $originInfo = & { Set-StrictMode -Version 1; $_.OriginInfo >>>> }
cmd :
At C:\projects\libxml2-win-binaries\build.ps1:46 char:1
+ cmd /c "nmake -f win32/Makefile.msc zlib.lib"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation. All rights reserved.</code>
</pre></div>gaifullinbftag:help.appveyor.com,2012-11-13:Comment/431532192017-08-09T21:42:08Z2017-08-09T21:42:22ZPowershell Script That Launches nmake Loses Logs<div><p>Seems like <code>nmake</code> write output to stdErr. Ultimate solution is to use <code>cmd</code> instead of <code>ps</code>, but I am not sure you want to rewrite the script. Please try run as <code>cmd</code> with <code>powershell.exe</code> like:</p>
<pre>
<code>build_script:
- ps: >-
$x64param = if ($env:Architecture -eq 'x64') { $true } else { $false }
$vs2008param = if ($env:Compiler -eq 'vs2008') { $true } else { $false }
- powershell.exe .\build.ps1 -x64:$x64param -vs2008:$vs2008param</code>
</pre></div>Ilya Finkelshteyn