From 6a5678f5a40cd95a86f7338c1f4b5e4da976d38b Mon Sep 17 00:00:00 2001 From: Chandrakana Nandi Date: Wed, 22 Nov 2023 18:03:06 -0800 Subject: [PATCH] fix bug in allow paths --- Cargo.toml | 1 + src/compile.rs | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 03a4533..5c7ce58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,3 +29,4 @@ similar = "2" strum = "0.24.1" strum_macros = "0.24.3" tempfile = "3" +itertools = "0.12.0" \ No newline at end of file diff --git a/src/compile.rs b/src/compile.rs index 88ebb2c..c266265 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -1,3 +1,4 @@ +use itertools::join; use crate::invoke_command; use crate::SolAST; use serde_json::Value; @@ -299,9 +300,9 @@ impl Solc { if let Some(allow_paths) = &self.allow_paths { flags.push(ALLOWPATHS.into()); - for r in allow_paths { - flags.push(r.clone()); - } + let comma_separated = join(allow_paths, ","); + flags.push(comma_separated); + } if let Some(include_path) = &self.include_path {