File tree 3 files changed +17
-20
lines changed
3 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -33,24 +33,13 @@ format:
33
33
```
34
34
35
35
This is how the documentation and examples assume you are running ` x.py ` .
36
- Some alternative ways are:
37
-
38
- ``` sh
39
- # On a Unix shell if you don't have the necessary `python3` command
40
- ./x < subcommand> [flags]
41
-
42
- # On the Windows Command Prompt (if .py files are configured to run Python)
43
- x.py < subcommand> [flags]
44
-
45
- # You can also run Python yourself, e.g.:
46
- python x.py < subcommand> [flags]
47
- ```
36
+ See the [ rustc dev guide] [ rustcguidebuild ] if this does not work on your platform.
48
37
49
38
More information about ` x.py ` can be found by running it with the ` --help ` flag
50
39
or reading the [ rustc dev guide] [ rustcguidebuild ] .
51
40
52
41
[ gettingstarted ] : https://rustc-dev-guide.rust-lang.org/getting-started.html
53
- [ rustcguidebuild ] : https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html
42
+ [ rustcguidebuild ] : https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#what-is-xpy
54
43
55
44
### Dependencies
56
45
Original file line number Diff line number Diff line change @@ -160,10 +160,10 @@ pub fn check(
160
160
for & ( name, _) in gate_untested. iter ( ) {
161
161
println ! ( "Expected a gate test for the feature '{name}'." ) ;
162
162
println ! (
163
- "Hint: create a failing test file named 'feature-gate-{}.rs'\
164
- \n in the 'ui' test suite, with its failures due to\
165
- \n missing usage of `#![feature({})]`." ,
166
- name, name
163
+ "Hint: create a failing test file named 'tests/ui/ feature-gates/feature- gate-{}.rs', \
164
+ \n with its failures due to missing usage of `#![feature({})]`." ,
165
+ name . replace ( "_" , "-" ) ,
166
+ name
167
167
) ;
168
168
println ! (
169
169
"Hint: If you already have such a test and don't want to rename it,\
Original file line number Diff line number Diff line change 5
5
$ErrorActionPreference = " Stop"
6
6
7
7
# syntax check
8
- Get-Command - syntax ${PSCommandPath}
8
+ Get-Command - syntax ${PSCommandPath} > $null
9
9
10
10
$xpy = Join-Path $PSScriptRoot x.py
11
11
# Start-Process for some reason splits arguments on spaces. (Isn't powershell supposed to be simpler than bash?)
@@ -16,7 +16,13 @@ foreach ($arg in $args) {
16
16
}
17
17
18
18
function Get-Application ($app ) {
19
- return Get-Command $app - ErrorAction SilentlyContinue - CommandType Application
19
+ $cmd = Get-Command $app - ErrorAction SilentlyContinue - CommandType Application | Select-Object - First 1
20
+ if ($cmd.source -match ' .*AppData\\Local\\Microsoft\\WindowsApps\\.*exe' ) {
21
+ # Windows for some reason puts a `python3.exe` executable in PATH that just opens the windows store.
22
+ # Ignore it.
23
+ return $false
24
+ }
25
+ return $cmd
20
26
}
21
27
22
28
function Invoke-Application ($application , $arguments ) {
@@ -51,5 +57,7 @@ if (($null -ne $found) -and ($found.Length -ge 1)) {
51
57
Invoke-Application $python $xpy_args
52
58
}
53
59
54
- Write-Error " ${PSCommandPath} : error: did not find python installed"
60
+ $msg = " ${PSCommandPath} : error: did not find python installed`n "
61
+ $msg += " help: consider installing it from https://www.python.org/downloads/"
62
+ Write-Error $msg - Category NotInstalled
55
63
Exit 1
You can’t perform that action at this time.
0 commit comments