-
Notifications
You must be signed in to change notification settings - Fork 985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] Environment loading is not compatible with powershell 7 #17339
Comments
Hi @Todiq, |
Thanks @Todiq -
Is this common practice? The Microsoft documentation: https://learn.microsoft.com/en-us/powershell/scripting/whats-new/migrating-from-windows-powershell-51-to-powershell-7?view=powershell-7.4 and other references I can find on the matter, do mention that Just checking if there is more insights as to to why
I believe that's how it is documented to be able to invoke a script in a quote-surrounded file path, which might otherwise result in the string being printed. Possibly we can pass |
Thanks for your answers. It is in fact not a common practice, you are right. Here is the complete explanation: My company has limited CPU resources. While we use GitLab cloud, we only have 2 on-premise GitLab runners running many jobs. One is Linux while the other one is Windows. Both are docker-based runners, meaning that they would start each job in its own docker container (linux or windows based). GitLab runners are defined by a On our Windows runner, we chose the docker-windows executor. Many jobs would use the windows server core image in order to execute commands in a Windows environment. This image only contains powershell 5. Although written otherwise, the shell does also affect the On the other hand, for conan builds, using pwsh provides the conveniency to use the same commands in both Linux and Windows and fixes file encondings (pwsh defaults to UTF8) (#16921). However, now that The only solution that I found was to create a Windows docker image and replace the original |
Describe the bug
Hello,
Whenever trying to run a
conan build
on a windows container withpowershell
that links topwsh
, I am getting this error:To understand a bit the situation, I reran the command with
-vvv
, which gave me:Which made me question myself regarding the following call:
powershell.exe "&'C:\workspace\metamodel\build\windows-msvc-194-x86_64\generators\conanbuild.ps1'"
What is the rationale behind it? Couldn't one simply call
powershell.exe "C:\workspace\metamodel\build\windows-msvc-194-x86_64\generators\conanbuild.ps1"
? This way, the command would be compatible with both pwsh and powershell 5.Otherwise, could we consider adding a new conf in order to support powershell > 5?
Thanks in advance for your time.
How to reproduce it
No response
The text was updated successfully, but these errors were encountered: