Skip to content
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

Fix bin\crystal.ps1 writing to standard error stream #13372

Merged

Conversation

HertzDevil
Copy link
Contributor

The bin\crystal.ps1 script itself writes to PowerShell's error stream, which is actually mapped to the output stream by default when the script is executed via powershell.exe -Command, rather than inside a PowerShell session. This PR adds the necessary workaround.

In particular, it makes make -fMakefile.win clean_cache work correctly on Windows. Without it the target would run:

if exist "Using compiled compiler at .\.build\crystal.exe C:\Users\nicet\AppData\Local\crystal\cache" rd /S /Q "Using compiled compiler at .\.build\crystal.exe C:\Users\nicet\AppData\Local\crystal\cache"

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:infrastructure platform:windows Windows support based on the MSVC toolchain / Win32 API labels Apr 21, 2023
@straight-shoota straight-shoota added this to the 1.9.0 milestone Apr 21, 2023
@straight-shoota straight-shoota merged commit 27f3950 into crystal-lang:master Apr 24, 2023
@HertzDevil HertzDevil deleted the bug/crystal-ps1-stderr branch April 24, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. platform:windows Windows support based on the MSVC toolchain / Win32 API topic:infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants