Skip to content

Commit

Permalink
chore: update the run-async execute parameter to run-sync parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
rrkumarshikhar committed Oct 22, 2024
1 parent 34fe55a commit 4ef947a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions riocli/deployment/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -119,7 +119,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,
Expand Down
8 changes: 4 additions & 4 deletions riocli/device/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -65,7 +65,7 @@ def execute_command(
user=user,
shell=shell,
command=command,
background=run_async,
background=not run_sync,
timeout=timeout,
)

Expand Down

0 comments on commit 4ef947a

Please sign in to comment.