blob: 9064a52ac2d3681387604babb9648b807ec3a135 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 6b31232a9d32529e30765108f30365ac48587ce6 Mon Sep 17 00:00:00 2001
From: Georgy Yakovlev <gyakovlev@gentoo.org>
Date: Thu, 8 Oct 2020 15:48:33 -0700
Subject: [PATCH] don't create prefix at time of check
---
src/bootstrap/install.rs | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/bootstrap/install.rs b/src/bootstrap/install.rs
index d9ee3bc..c5da9ce 100644
--- a/src/bootstrap/install.rs
+++ b/src/bootstrap/install.rs
@@ -73,12 +73,8 @@ fn install_sh(
let docdir_default = datadir_default.join("doc/rust");
let libdir_default = PathBuf::from("lib");
let mandir_default = datadir_default.join("man");
- let prefix = builder.config.prefix.as_ref().map_or(prefix_default, |p| {
- fs::create_dir_all(p)
- .unwrap_or_else(|err| panic!("could not create {}: {}", p.display(), err));
- fs::canonicalize(p)
- .unwrap_or_else(|err| panic!("could not canonicalize {}: {}", p.display(), err))
- });
+
+ let prefix = builder.config.prefix.as_ref().unwrap_or(&prefix_default);
let sysconfdir = builder.config.sysconfdir.as_ref().unwrap_or(&sysconfdir_default);
let datadir = builder.config.datadir.as_ref().unwrap_or(&datadir_default);
let docdir = builder.config.docdir.as_ref().unwrap_or(&docdir_default);
--
2.28.0
|