about summary refs log tree commit diff
path: root/x.ps1
AgeCommit message (Collapse)AuthorLines
2023-12-09use `&` instead of start-process in x.ps1jyn-16/+3
start-process has weird parsing rules and buggy behavior. we've already had to work around them several times, and the workarounds were not complete. i wonder who could have added it HMMMMMM ``` PS C:\Users\jyn\src\rust> git log --reverse -S Start-Process x.ps1 commit 775c3c0493e9a383a7f1c521b06d36f2e3d0d886 Author: Jynn Nelson <github@jyn.dev> Date: Sun Jul 31 14:02:31 2022 -0500 Add `x.sh` and `x.ps1` shell scripts ``` the latest broken thing is trailing backslashes: ``` $ x.ps1 t .\tests\ui\error-emitter\ ``` would be transformed into ``` ['t', '.\\tests\\ui\\error-emitter"'] ``` rather than trying to hack around that too, abandon start-process altogether and just use `&`.
2023-10-23x.ps1: remove the check for Python from Windows StoreSean Cross-5/+0
When installing Python from the Windows Store, a copy of `python.exe` is installed inder the Microsoft directory in the user's local AppData directory. Currently, `x.ps1` checks for this file, because by default running `python.exe` opens a link to the Microsoft Store rather than running Python. Once the user installs Python, however, this contains a valid interpreter. Unfortuantely, `x.ps1` can't tell the difference between a legitimate Python install and the stub. Remove the check, as it makes it impossible to use the official version from Microsoft once it has been installed. Signed-off-by: Sean Cross <sean@xobs.io>
2023-06-24Don't print "x.ps1"jyn-1/+1
This is left over from adding `Get-Command -syntax`; it's not helpful.
2023-06-24Give a better error on Windows if python isn't installedjyn-2/+10
Before: ``` PS C:\Users\vboxuser\rust> ./x x.ps1 PS C:\Users\vboxuser\rust> ``` After: ``` PS C:\Users\vboxuser\rust> ./x x.ps1 C:\Users\vboxuser\rust\x.ps1 : C:\Users\vboxuser\rust\x.ps1: error: did not find python installed help: consider installing it from https://www.python.org/downloads/windows/ At line:1 char:1 + ./x + ~~~ + CategoryInfo : NotInstalled: (:) [Write-Error], WriteErrorException + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,x.ps1 ``` The existing message from the shell script is already decent and I decided not to change it: ``` $ ./x Python was not found but can be installed from the Microsoft Store: ms-windows-store://pdp/?productid=9NJ46SX7X90P ```
2023-05-06Rollup merge of #111151 - ozkanonur:syntax-check-on-bootstrap-scripts, ↵Matthias Krüger-0/+5
r=Mark-Simulacrum check bootstrap scripts syntax Fails bootstrapping if `x`/`x.ps1` scripts are not valid. Currently, it keeps executing lines until the invalid one.
2023-05-03check bootstrap scripts syntaxozkanonur-0/+5
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-05-03Return error code from x.ps1Chris Denton-0/+7
2022-12-28Powershell: Create a `Start-Process` wrapperChris Denton-5/+8
2022-12-28Powershell: Use `WaitForExit` instead of `-Wait`Chris Denton-1/+2
2022-10-31Add better python discoveryAlbert Larsan-1/+12
`x.ps1` and `x` will now search for python executables like `python3.9` and `python3.10.exe`
2022-08-12Use an extensionless `x` script for non-WindowsJosh Stone-1/+1
2022-08-08Add `x.sh` and `x.ps1` shell scriptsJoshua Nelson-0/+28
This is a more ambitious version of https://github.com/rust-lang/rust/pull/98716. It still changes the shebang back to python3, for compatibility with non-Unix systems, but also adds alternative entrypoints for systems without `python3` installed. These scripts will be necessary for the rust entrypoint (#94829), so I see little downside in adding them early.