From 63816d976434961c426396c87207a53ee91d1f87 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 1 Oct 2019 16:17:24 -0700 Subject: [PATCH] composer-cli: Fix error handling in providers push --- src/composer/cli/providers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/composer/cli/providers.py b/src/composer/cli/providers.py index e4582fa3..0bd52493 100644 --- a/src/composer/cli/providers.py +++ b/src/composer/cli/providers.py @@ -151,8 +151,10 @@ def providers_push(socket_path, api_version, args, show_json=False, testmode=0): """ if len(args) == 0: log.error("push is missing the profile TOML file") + return 1 if not os.path.exists(args[0]): log.error("Missing profile TOML file: %s", args[0]) + return 1 api_route = client.api_url(api_version, "/upload/providers/save") profile = toml.load(args[0])