Skip to content

Commit e73b4c1

Browse files
committed
Add --ignore-path flag.
1 parent b5e4761 commit e73b4c1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

libpunchq/cli.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,8 @@ def command():
925925
@click.option('--service-name', '-n', type=click.UNPROCESSED, default=None, help='A service name to use.')
926926
@click.option('--wait', '-w', default=5, show_default=True,
927927
help='Number of seconds to wait before cleaning up the service.')
928-
def execute(cmd, args, service_name, wait):
928+
@click.option('--ignore-path', is_flag=True, help='Do not warn about full paths.')
929+
def execute(cmd, args, service_name, wait, ignore_path):
929930
"""
930931
Execute an arbitrary command.
931932
@@ -943,8 +944,8 @@ def execute(cmd, args, service_name, wait):
943944
service_name = str(service_name).replace('-', '').replace(' ', '')[0:16]
944945

945946
# Check if a full path was provided for the command to run.
946-
# Seems like the ENV does not have a PATH.
947-
if '/' not in cmd:
947+
# Seems like the ENV for MQ does not have a PATH set
948+
if '/' not in cmd and not ignore_path:
948949
click.secho('The command does not appear to be a full path to the executable. This command execution may '
949950
'fail. Are you sure you want to continue?', fg='yellow')
950951
if not click.confirm('Continue?'):

0 commit comments

Comments
 (0)