Skip to content

Commit 7e47170

Browse files
committed
Merge branch 'dev' into dev-source-unit
2 parents 256f04d + a2c7147 commit 7e47170

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

crytic_compile/platform/brownie.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,9 @@ def _get_version(compiler: Dict) -> str:
206206
str: Compiler version
207207
"""
208208
version = compiler.get("version", "")
209-
version = version[len("Version: ") :]
210-
version = version[0 : version.find("+")]
209+
if "Version:" in version:
210+
version = version.split("Version:")[1].strip()
211+
version = version[0 : version.find("+")] # TODO handle not "+" not found
211212
return version
212213

213214

crytic_compile/platform/solc_standard_json.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import json
55
import logging
66
import os
7+
from pathlib import Path
78
import shutil
89
import subprocess
910
from typing import TYPE_CHECKING, Dict, List, Optional, Union, Any
@@ -132,7 +133,8 @@ def run_solc_standard_json(
132133
Returns:
133134
Dict: Solc json output
134135
"""
135-
cmd = [compiler_version.compiler, "--standard-json", "--allow-paths", "."]
136+
working_dir_resolved = Path(working_dir if working_dir else ".").resolve()
137+
cmd = [compiler_version.compiler, "--standard-json", "--allow-paths", str(working_dir_resolved)]
136138
additional_kwargs: Dict = {"cwd": working_dir} if working_dir else {}
137139

138140
env = dict(os.environ)

scripts/ci_test_dapp.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
### Test dapp integration
44

5+
# work around having two python versions loading libraries from each other in CI
6+
OLD_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
7+
alias crytic-compile='LD_LIBRARY_PATH=$OLD_LD_LIBRARY_PATH crytic-compile'
8+
unset LD_LIBRARY_PATH
9+
510
DIR=$(mktemp -d)
611
cd "$DIR" || exit 255
712

0 commit comments

Comments
 (0)