-
Describe the issue:When using shell-scripting passing the command-line argument, it will not work properly. Code example to reproduce the issue:
Version:Echidna 2.2.1 Relevant log output:yarn run v1.22.19
$ echidna . --contract $1 --test-mode assertion --config echidna_config.yaml TestSwapFactory
echidna: Couldn't compile given file
stdout:
stderr:
Traceback (most recent call last):
File "/opt/homebrew/bin/crytic-compile", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/homebrew/Cellar/crytic-compile/0.3.5_1/libexec/lib/python3.12/site-packages/crytic_compile/__main__.py", line 221, in main
compilations = compile_all(**vars(args))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/crytic-compile/0.3.5_1/libexec/lib/python3.12/site-packages/crytic_compile/crytic_compile.py", line 740, in compile_all
raise NotImplementedError()
NotImplementedError
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi! From what I can tell, yarn v1 (the version you're using) does not support inserting commands in arbitrary positions. Yarn v2 might have added support, judging by the discussion on this link. https://stackoverflow.com/questions/50835221/pass-command-line-argument-to-child-script-in-yarn As you can see, the command generated for your example turned out to be invalid (note the stray "TestSwapFactory" in the end, and the literal $1) Consider using this alternative: "check-assertion": "echidna . --test-mode assertion --config echidna_config.yaml --contract" // the argument with the name will be user-provided |
Beta Was this translation helpful? Give feedback.
Hi! From what I can tell, yarn v1 (the version you're using) does not support inserting commands in arbitrary positions. Yarn v2 might have added support, judging by the discussion on this link.
https://stackoverflow.com/questions/50835221/pass-command-line-argument-to-child-script-in-yarn
As you can see, the command generated for your example turned out to be invalid (note the stray "TestSwapFactory" in the end, and the literal $1)
Consider using this alternative: