-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Make the x tool use the x and x.ps1 scripts #105844
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This looks roughly right, but please fix @Nilstrieb's comment. Also, there's a lot of cfgs - if you could have a single fn x_command() -> Command
function that's different depending on cfg(windows)
, that would be easier to understand, I think.
@rustbot ready I applied the suggestions and corrected the comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! r=me with the last nit addressed and the comment on the first line changed to say "bootstrap" instead of "x.py
"
@jyn514, I did what you asked. Do you want me to squash the commits? |
That would be great, thanks! If you can double check the new tool works for you on Windows that would also be helpful :) I can test on Linux. |
src/tools/x/src/main.rs
Outdated
"RemoteSigned", | ||
"-Command", | ||
]) | ||
.arg(dir.join("x.ps1")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this breaks for me when there's spaces in the file name:
PS C:\Users\Joshua Nelson\src\rust> x
C:\Users\Joshua : The term 'C:\Users\Joshua' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ C:\Users\Joshua Nelson\src\rust\x.ps1
+ ~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Users\Joshua:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Maybe use .current_dir(dir).arg("./x.ps1")
instead so we don't have to worry about quoting it properly?
This removes another python search from bootstrap.
fd6a0bf
to
8348e05
Compare
I rebased, squashed and applied your suggestions. It works on Windows, but I cannot test on Linux. |
Works great! Thank you :) @bors r+ rollup (the x tool isn't tested in CI, other than rustfmt) |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#96584 (Fix `x setup -h -v` should work) - rust-lang#105420 (Remove dead code after destination propagation) - rust-lang#105844 (Make the x tool use the x and x.ps1 scripts) - rust-lang#105854 (remove redundant clone) - rust-lang#105858 (Another `as_chunks` example) - rust-lang#105870 (avoid .into() conversion to identical types) - rust-lang#105875 (don't destuct references just to reborrow) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This removes another python search from bootstrap.
r? @jyn514