Search code examples
appveyor

What is the right syntax for launching an executable in Appveyor?


I'm trying to start the Azure Storage Emulator in an AppVeyor instance but I can't find the right syntax. I've tried this:

- ps: "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start

and this:

- ps: & "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start

and this:

- "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start

All fail with various unhelpful YAML parsing errors.


Solution

  • - cmd: '"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start'
    

    or simple:

    - '"C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start'
    

    or with PowerShell:

    - ps: '& "C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator\AzureStorageEmulator.exe" start'
    

    Easiest way to avoid YAML parsing errors is to do initial configuration in UI and then press Export YAML. GitHub search for appveyor.yml <something> often brings useful results too.