Cannot execute PS1 script

jan.drabner's Avatar

jan.drabner

13 Mar, 2018 10:56 AM

I have the following written in my appveyor.yml:
init:
    - ps: .\build_scripts\appveyor_set_version.ps1 1 1 {build}

Running the exact same line locally (replacing the {build} of course) works just fine.

But AppVeyor produces an error trying to run the script.
 The term '.\build_scripts\appveyor_set_version.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

What is going on? I find this rather confusing.
I assumed the working directory of the whole build to be the repo root.

EDIT: Resolved.
Init is done before repo cloning.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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