toolforge-components-cli 0.0.18__tar.gz → 0.0.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {toolforge_components_cli-0.0.18 → toolforge_components_cli-0.0.20}/PKG-INFO +1 -1
- {toolforge_components_cli-0.0.18 → toolforge_components_cli-0.0.20}/pyproject.toml +1 -1
- {toolforge_components_cli-0.0.18 → toolforge_components_cli-0.0.20}/toolforge_components_cli/cli.py +22 -7
- {toolforge_components_cli-0.0.18 → toolforge_components_cli-0.0.20}/LICENSE +0 -0
- {toolforge_components_cli-0.0.18 → toolforge_components_cli-0.0.20}/README.md +0 -0
- {toolforge_components_cli-0.0.18 → toolforge_components_cli-0.0.20}/toolforge_components_cli/__init__.py +0 -0
- {toolforge_components_cli-0.0.18 → toolforge_components_cli-0.0.20}/toolforge_components_cli/components.py +0 -0
- {toolforge_components_cli-0.0.18 → toolforge_components_cli-0.0.20}/toolforge_components_cli/config.py +0 -0
{toolforge_components_cli-0.0.18 → toolforge_components_cli-0.0.20}/toolforge_components_cli/cli.py
RENAMED
|
@@ -188,13 +188,15 @@ def config_create(ctx, config: TextIO | None, as_json: bool) -> None:
|
|
|
188
188
|
components_client = ctx.obj["components_client"]
|
|
189
189
|
display_messages = not as_json
|
|
190
190
|
|
|
191
|
-
if config is None:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
config_data = yaml.safe_load(
|
|
191
|
+
if config is None and _should_prompt():
|
|
192
|
+
click.echo(MISSING_CONFIG_MSG, err=True)
|
|
193
|
+
sys.exit(1)
|
|
194
|
+
|
|
195
|
+
config_source = config if config is not None else sys.stdin
|
|
196
|
+
try:
|
|
197
|
+
config_data = yaml.safe_load(config_source)
|
|
198
|
+
except yaml.YAMLError as e:
|
|
199
|
+
raise ToolforgeUserError(f"Invalid YAML configuration: {e}") from e
|
|
198
200
|
|
|
199
201
|
response = components_client.post(
|
|
200
202
|
"/config", json=config_data, display_messages=display_messages
|
|
@@ -519,6 +521,19 @@ def deployment_list(ctx, as_json: bool) -> None:
|
|
|
519
521
|
return
|
|
520
522
|
|
|
521
523
|
deployments = response.get("data", {}).get("deployments", [])
|
|
524
|
+
if not deployments:
|
|
525
|
+
click.echo(
|
|
526
|
+
click.style(
|
|
527
|
+
(
|
|
528
|
+
"No deployments found, you can create one using `toolforge components deployment create`,"
|
|
529
|
+
+ "run `toolforge components deployment create --help` for more details"
|
|
530
|
+
),
|
|
531
|
+
fg="yellow",
|
|
532
|
+
),
|
|
533
|
+
err=True,
|
|
534
|
+
)
|
|
535
|
+
return
|
|
536
|
+
|
|
522
537
|
formatted_deployments = [
|
|
523
538
|
[
|
|
524
539
|
deployment["deploy_id"],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|