fix(solc): respect offline mode (#1002)
This commit is contained in:
parent
1446f410ab
commit
f55f02476c
|
@ -641,12 +641,19 @@ impl VersionedSources {
|
||||||
SolcError::msg(format!("solc \"{}\" should have been installed", version))
|
SolcError::msg(format!("solc \"{}\" should have been installed", version))
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
if self.offline {
|
||||||
|
tracing::trace!(
|
||||||
|
"skip verifying solc checksum for {} in offline mode",
|
||||||
|
solc.solc.display()
|
||||||
|
);
|
||||||
|
} else {
|
||||||
tracing::trace!("verifying solc checksum for {}", solc.solc.display());
|
tracing::trace!("verifying solc checksum for {}", solc.solc.display());
|
||||||
if solc.verify_checksum().is_err() {
|
if solc.verify_checksum().is_err() {
|
||||||
tracing::trace!("corrupted solc version, redownloading \"{}\"", version);
|
tracing::trace!("corrupted solc version, redownloading \"{}\"", version);
|
||||||
Solc::blocking_install(version.as_ref())?;
|
Solc::blocking_install(version.as_ref())?;
|
||||||
tracing::trace!("reinstalled solc: \"{}\"", version);
|
tracing::trace!("reinstalled solc: \"{}\"", version);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
let solc = solc.arg("--allow-paths").arg(allowed_lib_paths.to_string());
|
let solc = solc.arg("--allow-paths").arg(allowed_lib_paths.to_string());
|
||||||
let version = solc.version()?;
|
let version = solc.version()?;
|
||||||
sources_by_version.insert(solc, (version, sources));
|
sources_by_version.insert(solc, (version, sources));
|
||||||
|
|
Loading…
Reference in New Issue