Skip to content

Commit 2bbe730

Browse files
authored
Merge pull request #539 from crytic/fix/target-not-found-error
fix: raise error when target is not file/directory
2 parents ec1826a + bb8205f commit 2bbe730

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crytic_compile/crytic_compile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ def compile_all(target: str, **kwargs: str) -> List[CryticCompile]:
697697
**kwargs: optional arguments. Used: "solc_standard_json"
698698
699699
Raises:
700-
NotImplementedError: If the target could not be compiled
700+
ValueError: If the target could not be compiled
701701
702702
Returns:
703703
List[CryticCompile]: Returns a list of CryticCompile instances for all compilations which occurred.
@@ -737,12 +737,11 @@ def compile_all(target: str, **kwargs: str) -> List[CryticCompile]:
737737
vyper_standard_json.add_source_files(vyper_filenames)
738738
compilations.append(CryticCompile(vyper_standard_json, **kwargs))
739739
else:
740-
raise NotImplementedError()
741740
# TODO split glob into language
742741
# # Attempt to perform glob expansion of target/filename
743742
# globbed_targets = glob.glob(target, recursive=True)
744743
# print(globbed_targets)
745744

746-
# raise ValueError(f"{str(target)} is not a file or directory.")
745+
raise ValueError(f"{str(target)} is not a file or directory.")
747746

748747
return compilations

0 commit comments

Comments
 (0)