Closed adamralph closed 5 years ago
Thanks, @adamralph. Looks generally good, except that the how_to_build.md
still says to run the ps1 file.
(And I think the prereqs are a mess, but that's not your problem!)
On the other hand, I still have a deploy.ps1 for the deployment, and it'd be a shame if that was reported as successful when it weren't. Maybe we should hold off a couple of days. Appveyor changes may make this superfluous.
We have an answer, and it seems we can fix both ps1 scripts. I'd like to find out the reason for the "swallow errors" default setting though, and investigate whether that should be changed.
I'd like to find out the reason for the "swallow errors" default setting though, and investigate whether that should be changed.
I think this is a PowerShell default setting, not related to AppVeyor
Yep, it is indeed a PowerShell problem. It can be worked around by passing -ErrorAction Stop
when executing the file. I've asked whether Appveyor will consider that, but I suspect the answer will be no, to avoid breaking projects which rely on the current behaviour. I wonder which is the lesser evil though...
See my latest responses on the Appveyor discussion thread. I think I've come to the conclusion that build.ps1
is not a good idea and build.cmd
should be used instead. PowerShell is just too broken.
@adamralph, thanks for continuing on. I'll worry about deploy.ps1
later, but I'm fine with a switch to build.cmd
. So if you want to update the how_to_build.md
, I think we can proceed with the PR.
@blairconrad I amended the commit to fix how_to_build.md
and I also noticed that the sln
needed a change.
Regarding deploy.ps1
, you should be OK, since you have ErrorActionPreference = "Stop"
at the top.
While you could add the same line to build.ps1
, it's such a trivial script that switching to build.cmd
is probably better. Also, build.cmd
gives a non-zero exit code when invoked from a console, and build.ps1
doesn't, even if it has ErrorActionPreference = "Stop"
. 🙄
Fixes #60