Skip to content

Commit de6cba1

Browse files
committed
Revert "fix: Automatically install nightly toolchain when missing"
This reverts commit d4b5d93.
1 parent de93334 commit de6cba1

File tree

2 files changed

+1
-26
lines changed

2 files changed

+1
-26
lines changed

src/config.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ pub struct Config {
119119
pub(crate) build_cpu_limit: Option<u32>,
120120
pub(crate) build_default_memory_limit: Option<usize>,
121121
pub(crate) include_default_targets: bool,
122-
#[allow(dead_code)]
123122
pub(crate) disable_memory_limit: bool,
124123

125124
// automatic rebuild configuration

src/docbuilder/rustwide_builder.rs

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -299,34 +299,10 @@ impl RustwideBuilder {
299299
}
300300

301301
pub fn add_essential_files(&mut self) -> Result<()> {
302-
// Check if toolchain is available, install if needed
303-
match self.detect_rustc_version() {
304-
Ok(_) => {
305-
info!("Toolchain is already installed");
306-
}
307-
Err(err) => {
308-
// Check if the error is specifically due to missing toolchain
309-
let err_msg = err.to_string();
310-
if err_msg.contains("No such file or directory")
311-
|| err_msg.contains("command not found")
312-
|| err_msg.contains("not installed")
313-
{
314-
info!("Installing nightly toolchain because it was not found");
315-
self.update_toolchain()?;
316-
} else {
317-
// Don't try to install the toolchain if some other error occurred
318-
return Err(anyhow!(
319-
"Failed to detect rustc version: {}\n\nThis might indicate the nightly toolchain is not properly installed. Please run 'cratesfyi build update-toolchain' first.",
320-
err
321-
));
322-
}
323-
}
324-
}
325-
326302
let rustc_version = self.rustc_version()?;
327303
let parsed_rustc_version = parse_rustc_version(&rustc_version)?;
328304

329-
info!("building a dummy crate to get essential files for {rustc_version}");
305+
info!("building a dummy crate to get essential files");
330306

331307
let limits = self.get_limits(DUMMY_CRATE_NAME)?;
332308

0 commit comments

Comments
 (0)