Skip to content

Commit d560574

Browse files
committed
create symlink only for non-windows operating systems
1 parent a12d31d commit d560574

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/bootstrap/download.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,12 @@ impl Config {
340340
let rustfmt_path = bin_root.join("bin").join(exe("rustfmt", host));
341341
let rustfmt_stamp = bin_root.join(".rustfmt-stamp");
342342

343-
let legacy_rustfmt = self.initial_rustc.with_file_name(exe("rustfmt", host));
344-
if !legacy_rustfmt.exists() {
345-
t!(self.symlink_file(&rustfmt_path, &legacy_rustfmt));
343+
#[cfg(not(windows))]
344+
{
345+
let legacy_rustfmt = self.initial_rustc.with_file_name(exe("rustfmt", host));
346+
if !legacy_rustfmt.exists() {
347+
t!(self.symlink_file(&rustfmt_path, &legacy_rustfmt));
348+
}
346349
}
347350

348351
if rustfmt_path.exists() && !program_out_of_date(&rustfmt_stamp, &channel) {

0 commit comments

Comments
 (0)