tag:help.appveyor.com,2012-11-13:/discussions/problems/28238-the-syntax-of-the-command-is-incorrectAppVeyor: Discussion 2020-11-22T21:03:14Ztag:help.appveyor.com,2012-11-13:Comment/486500952020-09-21T20:57:04Z2020-09-21T20:57:06ZThe syntax of the command is incorrect<div><p>Dear support,</p>
<p>We recently started to have problems with our master builds, they all fail now<br>
with the following error: "The syntax of the command is incorrect. Command exited with code 255",<br>
see <a href="https://ci.appveyor.com/project/h2oops/datatable/builds/35326665">https://ci.appveyor.com/project/h2oops/datatable/builds/35326665</a> for example.</p>
<p>What is strange here, is that all the PR and release builds are green, and our appveyor.yml file<br>
was successfully validated with your "Validate YAML configuration" tool.</p>
<p>The appveyor.yml we are using is here <a href="https://github.com/h2oai/datatable/blob/master/appveyor.yml">https://github.com/h2oai/datatable/blob/master/appveyor.yml</a><br>
and the change we found is causing the problems is using "APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH"<br>
variable on the master build:<br>
<a href="https://github.com/h2oai/datatable/commit/1c3372b2fd58f1c8e2108a9a7d1252055afee9d2">https://github.com/h2oai/datatable/commit/1c3372b2fd58f1c8e2108a9a7...</a></p>
<p>Before this change the build is green, after this change we get the above error.<br>
Checking if this variable is defined before used doesn't help.</p>
<p>We would appreciate any help on this concern. Thanks a lot in advance!</p>
<p>Oleksiy</p></div>Oleksiy Kononenkotag:help.appveyor.com,2012-11-13:Comment/486500952020-09-22T00:57:21Z2020-09-22T00:57:21ZThe syntax of the command is incorrect<div><p>Hi Oleksiy,</p>
<p>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):</p>
<pre>
<code>install:
- ps: <check env var values and set a new "result" environment variable>
- cmd: if "%result%"=="something" command</code>
</pre>
<p>thus Windows batch <code>cmd</code> part is simple.</p></div>Feodor Fitsner