Set the base path if specified

This commit is contained in:
Omar Abdulla
2025-07-16 00:55:53 +03:00
parent fd2e004ee6
commit a0006cb9a8
3 changed files with 6 additions and 1 deletions
+3
View File
@@ -30,6 +30,9 @@ impl SolidityCompiler for Resolc {
.stderr(Stdio::piped())
.arg("--standard-json");
if let Some(ref base_path) = input.base_path {
command.arg("--base-path").arg(base_path);
}
if !input.allow_paths.is_empty() {
command.arg("--allow-paths").arg(
input
+3
View File
@@ -29,6 +29,9 @@ impl SolidityCompiler for Solc {
.stderr(Stdio::piped())
.arg("--standard-json");
if let Some(ref base_path) = input.base_path {
command.arg("--base-path").arg(base_path);
}
if !input.allow_paths.is_empty() {
command.arg("--allow-paths").arg(
input
-1
View File
@@ -70,7 +70,6 @@ where
};
let compiler = Compiler::<T::Compiler>::new()
.base_path(metadata.directory()?)
.allow_path(metadata.directory()?)
.solc_optimizer(mode.solc_optimize());