Skip to content

Commit

Permalink
Rollup merge of rust-lang#116349 - onur-ozkan:hfix, r=tmandry
Browse files Browse the repository at this point in the history
ensure the parent path's existence on `x install`

fixes rust-lang#116127 (comment)

cc `@tmandry`
  • Loading branch information
tmandry authored Oct 2, 2023
2 parents 1edf723 + 2c8759e commit d7621cd
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 d7621cd

Please sign in to comment.