AppVeyor shows error for aws cli, but not really an error

Matt Houser's Avatar

Matt Houser

15 Nov, 2018 03:54 PM

I have a PowerShell script AppVeyor-Deploy.ps1 with the following content:

aws --version
exit 0

In appveyor.yml I have this:

deploy_script:
- ps: return ./AppVeyor-Deploy.ps1

During the deployment stage, AppVeyor-Deploy.ps1 is executed and outputs the following in RED:

aws.exe : aws-cli/1.11.75 Python/2.7.9 Windows/2012Server botocore/1.5.38
At C:\projects\my-web\AppVeyor-Deploy.ps1:2 char:1
+ & aws --version
+ ~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (aws-cli/1.11.75...botocore/1.5.38:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

When I run AppVeyor-Deploy.ps1 locally, it just outputs the aws cli version:

aws-cli/1.11.75 Python/2.7.9 Windows/2012Server botocore/1.5.38

Why does AppVeyor not like the "aws --version" command?

  1. Support Staff 1 Posted by Owen McDonnell on 15 Nov, 2018 06:25 PM

    Owen McDonnell's Avatar

    Apparently aws cli outputs --version to stderr and not to stdout. In normal powershell environment this is not a problem but in a remote session it is. Perhaps newer versions of aws sdk will not have this problem (watch our platform updates, but until then you can try calling the script like this instead (i.e. calling powershell from cmd).

    deploy_script:
      - Powershell ./AppVeyor-Deploy.ps1
    
  2. Ilya Finkelshteyn closed this discussion on 15 Jan, 2019 09:00 PM.

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