The syntax of the command is incorrect

Oleksiy Kononenko's Avatar

Oleksiy Kononenko

21 Sep, 2020 08:57 PM

Dear support,

We recently started to have problems with our master builds, they all fail now
with the following error: "The syntax of the command is incorrect. Command exited with code 255",
see for example.

What is strange here, is that all the PR and release builds are green, and our appveyor.yml file
was successfully validated with your "Validate YAML configuration" tool.

The appveyor.yml we are using is here
and the change we found is causing the problems is using "APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH"
variable on the master build:

Before this change the build is green, after this change we get the above error.
Checking if this variable is defined before used doesn't help.

We would appreciate any help on this concern. Thanks a lot in advance!


  1. Support Staff 1 Posted by Feodor Fitsner on 22 Sep, 2020 12:57 AM

    Feodor Fitsner's Avatar

    Hi Oleksiy,

    I've noticed you changed the config, so your builds are green again? Anyway, I'd recommend trying PowerShell for evaluating environment variables, for example (pseudo-code):

    - ps: <check env var values and set a new "result" environment variable>
    - cmd: if "%result%"=="something" command

    thus Windows batch cmd part is simple.

  2. Feodor Fitsner closed this discussion on 22 Nov, 2020 09:03 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? 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