Skip to content

Commit

Permalink
Unrolled build for rust-lang#116349
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#116349 - onur-ozkan:hfix, r=tmandry

ensure the parent path's existence on `x install`

fixes rust-lang#116127 (comment)

cc `@tmandry`
  • Loading branch information
rust-timer authored Oct 2, 2023
2 parents 8e47113 + 2c8759e commit af0b630
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bootstrap/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ fn sanitize_sh(path: &Path) -> String {
}

fn is_dir_writable_for_user(dir: &PathBuf) -> bool {
let tmp_file = dir.join(".tmp");
match fs::File::create(&tmp_file) {
let tmp = dir.join(".tmp");
match fs::create_dir_all(&tmp) {
Ok(_) => {
fs::remove_file(tmp_file).unwrap();
fs::remove_dir_all(tmp).unwrap();
true
}
Err(e) => {
Expand Down

0 comments on commit af0b630

Please sign in to comment.