smartbugs / smartbugs

SmartBugs: A Framework to Analyze Ethereum Smart Contracts

Home Page:https://smartbugs.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SmartBugs script does not handle spaces in file names very well

mojtaba-eshghie opened this issue · comments

Describe the bug
I used the following command:

 ./smartbugs/smartbugs -c "experiment_results/1-project_patches1_tmp0.9_topp0.3_gpt-4-0125-preview/Coinfabrik-Polymath Core Audit/polymath-core-dev-3.1.0/contracts/datastore/DataStore.sol/slither/vulnerability-2/candidate_patches/patch_0/smartbugs_config.yml" -f "experiment_results/1-project_patches1_tmp0.9_topp0.3_gpt-4-0125-preview/Coinfabrik-Polymath Core Audit/polymath-core-dev-3.1.0/contracts/datastore/DataStore.sol/slither/vulnerability-2/candidate_patches/patch_0/patch_0.sol"

Which resulted in the following output:

usage: smartbugs [-c FILE] [-t TOOL [TOOL ...]] [-f PATTERN [PATTERN ...]] [--main] [--runtime] [--processes N] [--timeout N] [--cpu-quota N] [--mem-limit MEM]
                 [--runid ID] [--results DIR] [--log FILE] [--overwrite] [--json] [--sarif] [--quiet] [-v] [-h]
smartbugs: error: unrecognized arguments: Core Audit/polymath-core-dev-3.1.0/contracts/datastore/DataStore.sol/slither/vulnerability-2/candidate_patches/patch_0/smartbugs_config.yml

Platform

  • SmartBugs 2.0.8
  • Python 3.10.1.final.0 (64 bit)
  • Darwin 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:42:42 PDT 2023; root:xnu-10002.1.13~1/RELEASE_X86_64
  • CPU Intel(R) Core(TM) i7-1068NG7 CPU @ 2.30GHz

Additional context
It seems SB's script cannot handle spaces in folder names. I tried escaping the spaces in different ways. None of them worked.

Solved by PR #178

Thanks for the report and the patch!