Improve helper

pull/113/head
Josselin 6 years ago
parent c346cf4827
commit bdbf947ff5
  1. 6
      slither/__main__.py

@ -59,7 +59,7 @@ def _process(slither, detector_classes, printer_classes):
return results, analyzed_contracts_count
def process_truffle(dirname, args, detector_classes, printer_classes):
cmd = ['npx',args.truffle_local,'compile'] if args.truffle_local else ['truffle','compile']
cmd = ['npx',args.truffle_version,'compile'] if args.truffle_version else ['truffle','compile']
logger.info('truffle compile running...')
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@ -364,8 +364,8 @@ def parse_args(detector_classes, printer_classes):
help='Export results as JSON',
action='store',
default=None)
group_misc.add_argument('--truffle-local',
help='Use a local Truffle execution (with npx)',
group_misc.add_argument('--truffle-version',
help='Use a local Truffle version (with npx)',
action='store',
default=False)

Loading…
Cancel
Save