Skip to content

Commit e7bf04b

Browse files
committed
Update extension documentation: the SDK to execute commands on the host is not restricted to binaries listed in the extension metadata.
Signed-off-by: Guillaume Tardif <[email protected]>
1 parent e379c4e commit e7bf04b

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

content/manuals/extensions/extensions-sdk/dev/api/backend.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ console.log(output);
110110
111111
## Invoke an extension binary on the host
112112
113-
You can run binaries defined in the [host section](../../architecture/metadata.md#host-section)
114-
of the extension metadata.
113+
Invoke a binary on the host. The binary is typically shipped with your extension using the [host section](../../architecture/metadata.md#host-section) in the extension metadata. Note that extensions run with user access rights, this API is not restricted to binaries listed in the [host section](../../architecture/metadata.md#host-section) of the extension metadata (some extensions might install software during user interaction, and invoke newly installed binaries even if not listed in the extension metadata).
115114
116115
For example, execute the shipped binary `kubectl -h` command in the host:
117116

content/manuals/extensions/extensions-sdk/guides/invoke-host-binaries.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ provides, or even a shell script that you want to run on the host.
1313

1414
You could do that by executing the CLI from a container with the extension SDK. But this CLI needs to access the host's filesystem, which isn't easy nor fast if it runs in a container.
1515

16-
However host binaries invoke from the extension executables (as binaries, shell scripts)
17-
shipped as part of your extension and deployed to the host. As extensions can run on multiple platforms, this
16+
This page describes how to run executables on the host (binaries, shell scripts) that are shipped as part of your extension and deployed to the host. As extensions can run on multiple platforms, this
1817
means that you need to ship the executables for all the platforms you want to support.
1918

2019
Learn more about extensions [architecture](../architecture/_index.md).
2120

2221
> [!NOTE]
2322
>
24-
> Only executables shipped as part of the extension can be invoked with the SDK.
23+
> Note that extensions run with user access rights, this API is not restricted to binaries listed in the [host section](../architecture/metadata.md#host-section) of the extension metadata (some extensions might install software during user interaction, and invoke newly installed binaries even if not listed in the extension metadata).
2524
2625
In this example, the CLI is a simple `Hello world` script that must be invoked with a parameter and returns a
2726
string.

content/reference/api/extensions-sdk/DockerDesktopClient.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ ___
407407

408408
**execHostCmd**(`cmd`): `Promise`<[`ExecResultV0`](ExecResultV0.md)\>
409409

410-
You can run binaries defined in the host section in the extension metadata.
410+
Invoke a binary on the host. The binary is typically shipped with your extension using the host section in the extension metadata. Note that extensions run with user access rights, this API is not restricted to binaries listed in the host section of the extension metadata (some extensions might install software during user interaction, and invoke newly installed binaries even if not listed in the extension metadata)
411411

412412
```typescript
413413
window.ddClient.execHostCmd(`cliShippedOnHost xxx`).then((cmdResult: any) => {

0 commit comments

Comments
 (0)