Skip to content

Commit

Permalink
Merge pull request #539 from crytic/fix/target-not-found-error
Browse files Browse the repository at this point in the history
fix: raise error when target is not file/directory
  • Loading branch information
0xalpharush authored Jan 16, 2024
2 parents ec1826a + bb8205f commit 2bbe730
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crytic_compile/crytic_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ def compile_all(target: str, **kwargs: str) -> List[CryticCompile]:
**kwargs: optional arguments. Used: "solc_standard_json"
Raises:
NotImplementedError: If the target could not be compiled
ValueError: If the target could not be compiled
Returns:
List[CryticCompile]: Returns a list of CryticCompile instances for all compilations which occurred.
Expand Down Expand Up @@ -737,12 +737,11 @@ def compile_all(target: str, **kwargs: str) -> List[CryticCompile]:
vyper_standard_json.add_source_files(vyper_filenames)
compilations.append(CryticCompile(vyper_standard_json, **kwargs))
else:
raise NotImplementedError()
# TODO split glob into language
# # Attempt to perform glob expansion of target/filename
# globbed_targets = glob.glob(target, recursive=True)
# print(globbed_targets)

# raise ValueError(f"{str(target)} is not a file or directory.")
raise ValueError(f"{str(target)} is not a file or directory.")

return compilations

0 comments on commit 2bbe730

Please sign in to comment.