@@ -72,7 +72,8 @@ Some alternative ways are:
72
72
# On a Unix shell if you don't have the necessary `python3` command
73
73
./x < subcommand> [flags]
74
74
75
- # On Windows (if powershell is configured to run scripts)
75
+ # In Windows Powershell (if powershell is configured to run scripts)
76
+ ./x < subcommand> [flags]
76
77
./x.ps1 < subcommand> [flags]
77
78
78
79
# On the Windows Command Prompt (if .py files are configured to run Python)
@@ -82,7 +83,24 @@ x.py <subcommand> [flags]
82
83
python x.py < subcommand> [flags]
83
84
```
84
85
85
- ### Running ` x.py ` slightly more conveniently
86
+ On Windows, the Powershell commands may give you an error that looks like this:
87
+ ```
88
+ PS C:\Users\vboxuser\rust> ./x
89
+ ./x : File C:\Users\vboxuser\rust\x.ps1 cannot be loaded because running scripts is disabled on this system. For more
90
+ information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
91
+ At line:1 char:1
92
+ + ./x
93
+ + ~~~
94
+ + CategoryInfo : SecurityError: (:) [], PSSecurityException
95
+ + FullyQualifiedErrorId : UnauthorizedAccess
96
+ ```
97
+
98
+ You can avoid this error by allowing powershell to run local scripts:
99
+ ```
100
+ Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
101
+ ```
102
+
103
+ #### Running ` x.py ` slightly more conveniently
86
104
87
105
There is a binary that wraps ` x.py ` called ` x ` in ` src/tools/x ` . All it does is
88
106
run ` x.py ` , but it can be installed system-wide and run from any subdirectory
0 commit comments