diff options
| author | Zephaniah Ong <zealorez@gmail.com> | 2023-02-10 15:25:01 +0800 |
|---|---|---|
| committer | Zephaniah Ong <zealorez@gmail.com> | 2023-02-10 15:25:01 +0800 |
| commit | d560574c4bd621cfabaa413c79e76b1da1abf279 (patch) | |
| tree | 5634041e3cb38e63cc421034aea0d61d1b7b592f | |
| parent | a12d31d5a681d70f277b4fbf6cafe22bae876ea7 (diff) | |
| download | rust-d560574c4bd621cfabaa413c79e76b1da1abf279.tar.gz rust-d560574c4bd621cfabaa413c79e76b1da1abf279.zip | |
create symlink only for non-windows operating systems
| -rw-r--r-- | src/bootstrap/download.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/bootstrap/download.rs b/src/bootstrap/download.rs index 5c863015adb..7c5e7fb6ebc 100644 --- a/src/bootstrap/download.rs +++ b/src/bootstrap/download.rs @@ -340,9 +340,12 @@ impl Config { let rustfmt_path = bin_root.join("bin").join(exe("rustfmt", host)); let rustfmt_stamp = bin_root.join(".rustfmt-stamp"); - let legacy_rustfmt = self.initial_rustc.with_file_name(exe("rustfmt", host)); - if !legacy_rustfmt.exists() { - t!(self.symlink_file(&rustfmt_path, &legacy_rustfmt)); + #[cfg(not(windows))] + { + let legacy_rustfmt = self.initial_rustc.with_file_name(exe("rustfmt", host)); + if !legacy_rustfmt.exists() { + t!(self.symlink_file(&rustfmt_path, &legacy_rustfmt)); + } } if rustfmt_path.exists() && !program_out_of_date(&rustfmt_stamp, &channel) { |
