in reply to Re^2: AppVeyor failing to build/test CPAN distro
in thread AppVeyor failing to build/test CPAN distro
swl said,
One possibility is that the CI is running under powershell
As the "cribbed" source says, AppVeyor defaults to cmd for its script, and you have to prefix powershell scripts with ps: . So , since jkeenan1's cat shows no ps prefixes, I don't think that's the problem. (In the "cribbed" question, the questioner was specifically doing the cd in a - ps: cd ... command, so needed to use powershell syntax.)
swl said,
The cd call also might also not be needed if the system is already in the project dir.
I just checked a handful of my .appveyor.yml files, and none of them needs a cd to properly work. So I would agree with this advice.
However, AppVeyor's env-var docs claim that %APPVEYOR_PROJECT_NAME% is the correct name for that variable. I haven't printed that variable in a while (if ever), so I concur with swl's advice: jkeenan1 may want to echo both that variable, and I will add the suggestion for also echoing the %APPVEYOR_BUILD_FOLDER% mentioned in the "cribbed" source, because it doesn't make sense to me that the cd isn't working -- I thought momentarily that it might be because the variable value is lowercase whereas the directory might really be uppercase (or vice versa), but this is Windows, so case should be irrelevant. So even if the cd is not needed, I am still curious why it isn't working.
jkeenan1 said,
I don't have a terminal at which to echo that command.
I believe you misunderstood swl's echo advice: you can add commands your your .appveyor.yml to do the echo, and then re-run the CI. Change your "install" section to:
install: - if not exist "C:\strawberry" cinst strawberryperl - set PATH=C:\strawberry\perl\bin;C:\strawberry\perl\site\bin;C:\str +awberry\c\bin;%PATH% - echo cd C:\projects\%APPVEYOR_PROJECT_NAME% - echo %APPVEYOR_BUILD_FOLDER% - echo %CD% - cpanm --installdeps .
I think this will do two things: 1) assuming that the echo commands don't cause the "install" step to fail, it should show that the cd isn't needed, since my version of the "install" step doesn't actually execute the cd, and (2) it will show the current values of those environment variables, if it's needed for future debugging.
|
---|