Skip to content

Commit

Permalink
Unrolled build for rust-lang#117069
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#117069 - xobs:x.ps1-remove-windows-store-check, r=albertlarsan68

x.ps1: remove the check for Python from Windows Store

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.

This resolves rust-lang#117067
  • Loading branch information
rust-timer authored Oct 23, 2023
2 parents aec4741 + 1f9f041 commit 814c744
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions x.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ foreach ($arg in $args) {

function Get-Application($app) {
$cmd = Get-Command $app -ErrorAction SilentlyContinue -CommandType Application | Select-Object -First 1
if ($cmd.source -match '.*AppData\\Local\\Microsoft\\WindowsApps\\.*exe') {
# Windows for some reason puts a `python3.exe` executable in PATH that just opens the windows store.
# Ignore it.
return $false
}
return $cmd
}

Expand Down

0 comments on commit 814c744

Please sign in to comment.