From cd3cce4c531fba57d36af0e0b3c3aca271e06fc9 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Mon, 12 Sep 2022 10:52:17 +0200 Subject: [PATCH 1/2] extension SDK : cannot chain commands in exec() Signed-off-by: Guillaume Tardif --- desktop/extensions-sdk/dev/api/backend.md | 4 ++++ desktop/extensions-sdk/dev/api/docker.md | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/desktop/extensions-sdk/dev/api/backend.md b/desktop/extensions-sdk/dev/api/backend.md index d3c356f5c713..637094e7c1b7 100644 --- a/desktop/extensions-sdk/dev/api/backend.md +++ b/desktop/extensions-sdk/dev/api/backend.md @@ -170,3 +170,7 @@ window.ddClient.spawnHostCmd( } ); ``` + +> You cannot use this to chain commands in a single `exec()` invocation (like `cmd1 $(cmd2)` or using pipe between commands). +> +> You need to invoke `exec() for each commands, and parse results to pass parameters to the next command if needed. diff --git a/desktop/extensions-sdk/dev/api/docker.md b/desktop/extensions-sdk/dev/api/docker.md index 6ff2208202bc..28595f0ef374 100644 --- a/desktop/extensions-sdk/dev/api/docker.md +++ b/desktop/extensions-sdk/dev/api/docker.md @@ -1,5 +1,5 @@ --- -title: Docker +title: Docker description: Docker extension API keywords: Docker, extensions, sdk, API --- @@ -128,6 +128,10 @@ await ddClient.docker.cli.exec( ); ``` +> You cannot use this to chain commands in a single `exec()` invocation (like `docker kill $(docker ps -q)` or using pipe between commands). +> +> You need to invoke `exec() for each commands, and parse results to pass parameters to the next command if needed. + See the [Exec API reference](reference/interfaces/Exec.md) for details about these methods. > Deprecated execution of Docker commands From 526a8eaa024d240a4478ed29e58ee43c25e8557e Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Tue, 13 Sep 2022 10:01:54 +0200 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Allie Sadler <102604716+aevesdocker@users.noreply.github.com> --- desktop/extensions-sdk/dev/api/backend.md | 2 +- desktop/extensions-sdk/dev/api/docker.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/extensions-sdk/dev/api/backend.md b/desktop/extensions-sdk/dev/api/backend.md index 637094e7c1b7..04e144d096f2 100644 --- a/desktop/extensions-sdk/dev/api/backend.md +++ b/desktop/extensions-sdk/dev/api/backend.md @@ -173,4 +173,4 @@ window.ddClient.spawnHostCmd( > You cannot use this to chain commands in a single `exec()` invocation (like `cmd1 $(cmd2)` or using pipe between commands). > -> You need to invoke `exec() for each commands, and parse results to pass parameters to the next command if needed. +> You need to invoke `exec()` for each command and parse results to pass parameters to the next command if needed. diff --git a/desktop/extensions-sdk/dev/api/docker.md b/desktop/extensions-sdk/dev/api/docker.md index 28595f0ef374..687e0b5a7ca3 100644 --- a/desktop/extensions-sdk/dev/api/docker.md +++ b/desktop/extensions-sdk/dev/api/docker.md @@ -130,7 +130,7 @@ await ddClient.docker.cli.exec( > You cannot use this to chain commands in a single `exec()` invocation (like `docker kill $(docker ps -q)` or using pipe between commands). > -> You need to invoke `exec() for each commands, and parse results to pass parameters to the next command if needed. +> You need to invoke `exec()` for each command and parse results to pass parameters to the next command if needed. See the [Exec API reference](reference/interfaces/Exec.md) for details about these methods.