Access build script from global yaml script

mharen's Avatar


07 Oct, 2023 02:16 PM

Suppose I have 100s of projects already set up, and most of them have a command like this:
- dotnet nuget add source ...

Now that AppVeyor has global yaml, I'd love to move that step into the global yaml. Unfortunately, if I run it first, then the project itself runs it again, it'll fail the 2nd time, breaking all the older projects until I can update them.

I'm open to ideas on how to resolve this. One wild idea is that I could have my global script do a check on the build script of the current build context to see if "dotnet nuget add..." exists, and if so do nothing. Is there a way to access all the init/before/build/etc. scripts during a build for string searching like that?

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


? 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