From e55843f355e838aea78413255346cb60db97a27c Mon Sep 17 00:00:00 2001 From: alpharush <0xalpharush@protonmail.com> Date: Thu, 11 Jan 2024 11:59:03 -0600 Subject: [PATCH] lint --- crytic_compile/platform/foundry.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crytic_compile/platform/foundry.py b/crytic_compile/platform/foundry.py index 849ce22..8d54ffc 100755 --- a/crytic_compile/platform/foundry.py +++ b/crytic_compile/platform/foundry.py @@ -118,11 +118,11 @@ def is_supported(target: str, **kwargs: str) -> bool: return os.path.isfile(os.path.join(target, "foundry.toml")) @staticmethod - def config(target: str) -> Optional[PlatformConfig]: + def config(working_dir: str) -> Optional[PlatformConfig]: """Return configuration data that should be passed to solc, such as remappings. Args: - target (str): path to the target + working_dir (str): path to the working_dir Returns: Optional[PlatformConfig]: Platform configuration data such as optimization, remappings... @@ -130,7 +130,9 @@ def config(target: str) -> Optional[PlatformConfig]: result = PlatformConfig() LOGGER.info("'forge config --json' running") json_config = json.loads( - subprocess.run(["forge", "config", "--json"], stdout=subprocess.PIPE, check=True).stdout + subprocess.run( + ["forge", "config", "--json"], cwd=working_dir, stdout=subprocess.PIPE, check=True + ).stdout ) # Solc configurations