Windows actions suddenly fail needing a .nuspec file

After my most recent commit I noticed both my windows runners have failed while running the “CPACK” step. With the error
No .nuspec files (or more than 1) were found to build in 'D:\a\blackchocobo\blackchocobo'. Please specify the .nuspec file or try in a different directory. The commit in question is small update for MacOS Rpath stuff, in a cmake file inside an if(APPLE) block.

Action Log:
The Yml File:

What has caused me to suddenly need a .nuspec file (or have to0 many). I do not generate any or use nuget packages in the action.

I have the same issue with my Windows builds. I see in your project that your builds run again after this commit, but I can’t tell why. Did you figure out the problem or did it just fix itself somehow?

Yes, I did figure out the issue it turns out that chocolatey has a binary named cpack also and it was in being called instead of cmake’s cpack. I had changed my script to remove the chocolatey cpack. V
But then I think the CI was updated as I was able to remove the step seem below.

Hope that helps you out

1 Like

@sithlord48 This can’t be a fix. This is -at most- a workaround. I too ran into this issue since some time so I started googling and so I found this thread. :slight_smile:

What if you want to cpack (cmake) AND also construct chocolaty packages? Isn’t there a better way to fully qualify the cpack.exe of cmake instead of accidentally getting the wrong one? (Mind, I’m not a windows guy, my problem/thoughts may be stupid) :slight_smile:

Your right its a work around at best. And as i said the VM seams to have been updated since i was able to remove the step. its possible that chocolatey was updated again and they didn’t do what ever they previously did to place the cmake cpack in “path”. I would suspect that if you plan to use both cmake cpack and chocolatey cpack you would want to call each command using their full path to prevent any ambiguity. I think you can use some environmental var to refer to the install path for both choclatey and cmake.

Bug Report: [WINDOWS] .nuspec file suddenly needed when cpack is called. · Issue #4384 · actions/virtual-environments · GitHub

Thanks! The name conflict areas our problem also, we fixed it by calling cpack with its full path.