diff --git a/riocli/deployment/execute.py b/riocli/deployment/execute.py index 1d224651..56b4541f 100644 --- a/riocli/deployment/execute.py +++ b/riocli/deployment/execute.py @@ -37,7 +37,7 @@ @click.option('--user', default='root') @click.option('--shell', default='/bin/bash') @click.option('--timeout', default=300) -@click.option('--run-async', is_flag=True, default=True, help="Run the command in the background") +@click.option('--run-sync', is_flag=True, default=False, help="Run the command synchronously") @click.option('--exec', 'exec_name', default=None, help='Name of a executable in the component') @click.argument('deployment-name', type=str) @@ -47,7 +47,7 @@ def execute_command( shell: str, timeout: int, exec_name: str, - run_async: bool, + run_sync: bool, deployment_name: str, command: typing.List[str] ) -> None: @@ -64,8 +64,8 @@ def execute_command( shell is ``/bin/bash``. You can also specify the user using the ``--user`` option. The default user is ``root``. - To run the command synchronously,set the --run-async flag to false. - The default value is true. To specify the timeout, use the --timeout + To run the command synchronously,set the --run-sync flag to true. + The default value is false. To specify the timeout, use the --timeout flag, providing the duration in seconds. The default value is 300. Please ensure that you enclose the command in quotes to avoid @@ -111,7 +111,7 @@ def execute_command( user=user, shell=shell, command=command, - background=run_async, + background=not run_sync, deployment=deployment, exec_name=exec_name, device_name=deployment.spec.device.depends.nameOrGUID, diff --git a/riocli/device/execute.py b/riocli/device/execute.py index bdff46c2..cbd28659 100644 --- a/riocli/device/execute.py +++ b/riocli/device/execute.py @@ -30,7 +30,7 @@ @click.option('--user', default='root') @click.option('--timeout', default=300) @click.option('--shell', default='/bin/bash') -@click.option('--run-async', is_flag=True, default=True, help="Run the command in the background.") +@click.option('--run-sync', is_flag=True, default=False, help="Run the command synchronously") @click.argument('device-name', type=str) @click.argument('command', nargs=-1) @name_to_guid @@ -40,7 +40,7 @@ def execute_command( user: str, timeout: int, shell: str, - run_async: bool, + run_sync: bool, command: typing.List[str] ) -> None: """Execute commands on a device. @@ -49,7 +49,7 @@ def execute_command( the command execution. To specify the user, use the --user flag. The default is 'root'. To specify the shell, use the --shell flag. The default shell is '/bin/bash'. To run the command synchronously, - set the --run-async flag to false. The default value is true. To + set the --run-sync flag to true. The default value is false. To specify the timeout, use the --timeout flag, providing the duration in seconds. The default value is 300. @@ -65,7 +65,7 @@ def execute_command( user=user, shell=shell, command=command, - background=run_async, + background=not run_sync, timeout=timeout, )