Syntax error if first statement is environment variable

Andreas Schmidl's Avatar

Andreas Schmidl

05 Oct, 2016 08:17 AM


In appveyor.yml I set an environment variable which encapsulates a tool call. Later on I'm calling the tool using this environment variable. This results in a syntax error during parsing the yml file.

  - set CURL=curl -fsSL -O -m 300
  - %CURL% <url>

Error parsing appveyor.yml: (Line: 20, Col: 10, Idx: 450) - (Line: 20, Col: 11, Idx: 451): While scanning for the next token, find character that cannot start any token.

I'm assuming the "%" are the root cause of the problem. Is escaping a solution?

Best regards,

  1. 1 Posted by Ilya Finkelshte... on 05 Oct, 2016 04:34 PM

    Ilya Finkelshteyn's Avatar

    Hi Andreas,

    Please try - cmd /c %CURL% <url>

    Hope this helps.


  2. 2 Posted by Ilya Finkelshte... on 10 Oct, 2016 04:54 PM

    Ilya Finkelshteyn's Avatar

    BTW - '%CURL% <url>' (just in commas, without cmd) will work too

  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:08 AM.

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