Skip to content

Commit 29ff852

Browse files
committed
fix: preserve pre release version
1 parent c0c2f4b commit 29ff852

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

crates/compilers/src/compilers/solc/compiler.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,11 @@ impl Solc {
215215
#[instrument(skip_all)]
216216
#[cfg(feature = "svm-solc")]
217217
pub fn find_svm_installed_version(version: &Version) -> Result<Option<Self>> {
218-
let version = Version::new(version.major, version.minor, version.patch);
219218
let solc = svm::version_binary(&version.to_string());
220219
if !solc.is_file() {
221220
return Ok(None);
222221
}
223-
Ok(Some(Self::new_with_version(&solc, version)))
222+
Ok(Some(Self::new_with_version(&solc, version.clone())))
224223
}
225224

226225
/// Returns the directory in which [svm](https://github.com/roynalnaruto/svm-rs) stores all versions
@@ -294,13 +293,6 @@ impl Solc {
294293
#[cfg(test)]
295294
crate::take_solc_installer_lock!(_lock);
296295

297-
let version = if version.pre.is_empty() {
298-
Version::new(version.major, version.minor, version.patch)
299-
} else {
300-
// Preserve version if it is a prerelease.
301-
version.clone()
302-
};
303-
304296
trace!("blocking installing solc version \"{}\"", version);
305297
crate::report::solc_installation_start(&version);
306298
// The async version `svm::install` is used instead of `svm::blocking_install`

0 commit comments

Comments
 (0)