'./configure' now checks if 'config.toml' exists before writing to that destination#110123
'./configure' now checks if 'config.toml' exists before writing to that destination#110123bors merged 3 commits intorust-lang:masterfrom madsravn:master
Conversation
|
(rustbot has picked a reviewer for you, use r? to override) |
KittyBorgX
left a comment
There was a problem hiding this comment.
Can the function definition can be ommited and if os.path.isfile() block be directly placed in if __name__ == "__main__"?
Since there are no other function calls of the quit_if_file_exists function and its being abstracted away unnessecerily.
Thank you for your suggestion. If it isn't against any of the style guidelines, I would like to keep it in its own function. A function has a name which goes to show intent. Also I would like to clutter as little as possible in the main function as possible. |
A comment could perhaps do the same? Though I'm unsure of it. With regard to the style guide, I believe there are no rules against abstracting away to a function but I suggested doing against that since we're dealing with python and it could increase time usage and size of the file merely 😅 I'd suggest changing the |
jyn514
left a comment
There was a problem hiding this comment.
This seems good :) r=me with the two comments addressed.
…correct exit code
|
Thanks! @bors r+ rollup |
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#110123 ('./configure' now checks if 'config.toml' exists before writing to that destination) - rust-lang#110429 (Spelling src bootstrap) - rust-lang#110430 (Spelling src ci) - rust-lang#110515 (Don't special-case download-rustc in `maybe_install_llvm`) - rust-lang#110521 (Fix `x test lint-docs linkchecker` when download-rustc is enabled) - rust-lang#110525 (Fix `tests/run-make-translation` when download-rustc is enabled) - rust-lang#110531 (small type system cleanup) - rust-lang#110533 (Missing blanket impl trait not public) - rust-lang#110540 (Fix wrong comment in rustc_hir/src/hir.rs) - rust-lang#110541 (Fix various configure bugs) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
|
Or just rename it as
Thanks, |
Fixes #110109
Instead of overwriting the current
config.tomlfile, exit the./configurescript with a message stating why.