Skip to content

Commit e55843f

Browse files
committed
lint
1 parent 1889d94 commit e55843f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

crytic_compile/platform/foundry.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,21 @@ def is_supported(target: str, **kwargs: str) -> bool:
118118
return os.path.isfile(os.path.join(target, "foundry.toml"))
119119

120120
@staticmethod
121-
def config(target: str) -> Optional[PlatformConfig]:
121+
def config(working_dir: str) -> Optional[PlatformConfig]:
122122
"""Return configuration data that should be passed to solc, such as remappings.
123123
124124
Args:
125-
target (str): path to the target
125+
working_dir (str): path to the working_dir
126126
127127
Returns:
128128
Optional[PlatformConfig]: Platform configuration data such as optimization, remappings...
129129
"""
130130
result = PlatformConfig()
131131
LOGGER.info("'forge config --json' running")
132132
json_config = json.loads(
133-
subprocess.run(["forge", "config", "--json"], stdout=subprocess.PIPE, check=True).stdout
133+
subprocess.run(
134+
["forge", "config", "--json"], cwd=working_dir, stdout=subprocess.PIPE, check=True
135+
).stdout
134136
)
135137

136138
# Solc configurations

0 commit comments

Comments
 (0)