Merge branch 'patch-npx-alt' of https://github.com/mattaereal/slither into mattaereal-patch-npx-alt

pull/113/head
Josselin 6 years ago
commit 2f43bc1e6b
  1. 6
      slither/__main__.py

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

Loading…
Cancel
Save