Skip to content

Commit f27987e

Browse files
committed
expand usage info
1 parent 642a1c0 commit f27987e

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

airbyte_cdk/cli/source_declarative_manifest/_sandboxed_run.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,35 @@
1010
ENV_SANDBOX_MODE_NONE = "NONE"
1111

1212
USAGE = f"""
13-
Sandboxed execution of the source-declarative-manifest connector.
13+
-------------------------------------------
14+
-- source-declarative-manifest-sandboxed --
15+
-------------------------------------------
1416
15-
Usage: source-declarative-manifest-sandboxed [OPTIONS] [CMD]
17+
Sandboxed execution of the source-declarative-manifest connector. By default, this script
18+
wraps the source-declarative-manifest command in Firejail to run the connector in a sandboxed
19+
environment. If Firejail is not available, the connector will run without sandboxing.
1620
17-
Options:
18-
--help Show this help message and exit.
19-
--check-sandbox Check Firejail availability and exit.
21+
Environment variable '{ENV_SANDBOX_MODE}' controls the sandboxing behavior. The following values
22+
are supported:
23+
- '{ENV_SANDBOX_MODE_FIREJAIL}': Use Firejail to run the connector in a sandboxed environment.
24+
- '{ENV_SANDBOX_MODE_AUTO}': Use Firejail if available, otherwise run without sandboxing.
25+
- '{ENV_SANDBOX_MODE_NONE}': Disable sandboxing and run the connector without Firejail.
26+
27+
Usage: source-declarative-manifest-sandboxed [OPTIONS] [CMD]
2028
2129
CMD:
2230
The command to run in the sandboxed environment. This should be the command
2331
that would normally be run to start the connector. E.g. "check", "read", etc.
32+
The command is passed to the source-declarative-manifest entrypoint.
2433
25-
The command is ignored if specifying --check-sandbox or --help.
34+
The command is ignored if specifying any of the below options.
35+
36+
Options:
37+
--help Show this help message and exit.
38+
--check-sandbox Check Firejail availability and exit.
2639
"""
2740

41+
2842
def _wrap_in_sandbox(cmd: list[str]) -> list[str]:
2943
"""Wrap the given command in Firejail.
3044
This function modifies the command to include Firejail options

0 commit comments

Comments
 (0)