cl in AppVeyor powershell
Hi
why the command "cl" in Appveyor powershell pops up an exception as below while in powershell on my PC, no exception is throw?
usage: cl [ option... ] filename... [ /link linkoption... ]
cl : Microsoft (R) C/C++ Optimizing Compiler Version 18.00.40629 for x86
At line:20 char:3
+ cl
+ ~~
+ CategoryInfo : NotSpecified: (Microsoft (R) C...0.40629 for x86:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Copyright (C) Microsoft Corporation. All rights reserved.
Command executed with exception: Copyright (C) Microsoft Corporation. All rights reserved.
echo on_failure
on_failure
echo on_finish
on_finish
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 22 Dec, 2015 11:09 PM
You run it as PowerShell script (not CMD) and it looks like that command writes to StdErr which is interpreted by PowerShell as exception.
2 Posted by zosrothko on 23 Dec, 2015 04:16 AM
That's not exactly the point. I run cl under PS on my PC and there is no error as show below
Z:\git\poco>cl
Compilateur d'optimisation Microsoft (R) C/C++ version 18.00.30723 pour x64
Copyright (C) Microsoft Corporation. Tous droits réservés.
utilisation : cl [ option... ] nom de fichier... [ /link linkoption... ]
Z:\git\poco>powershell
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. Tous droits réservés.
PS Z:\git\poco> cl
Compilateur d'optimisation Microsoft (R) C/C++ version 18.00.30723 pour x64
Copyright (C) Microsoft Corporation. Tous droits réservés.
utilisation : cl [ option... ] nom de fichier... [ /link linkoption... ]
PS Z:\git\poco>
Support Staff 3 Posted by Feodor Fitsner on 23 Dec, 2015 04:28 AM
Try running it in PowerShell ISE
4 Posted by zosrothko on 23 Dec, 2015 04:30 AM
Do you mean AppVeyor jobs are run in the Powershel ISE context?
Support Staff 5 Posted by Feodor Fitsner on 23 Dec, 2015 04:37 AM
No, but my guess is that treating StdErr depends on PowerShell host.
zosrothko closed this discussion on 17 May, 2018 09:04 AM.