You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
vtex publish|install|deploy should exit with code <> 0 (e.g. exitcode 2) when operation failed vtex link --no-watch should exit with code <> 0 (e.g. exitcode 2) when operation failed
$ vtex publish
OK
$ vtex publish
20:55:33.775 - error: Publishing failed. [email protected]
20:55:33.828 - error: App build failed with message: Version '1.0.8' of app 'xxxxxxxxxxxxx.xxxxxxxxxxxxxxxx' has already been published.
20:55:33.829 - error: Failed to publish [email protected]
20:55:33.873 - info: Logged into xxxxxxxxxxx as [email protected] at workspace master
20:55:33.873 - info: Switched from xxxxxxxxxxx to xxxxxxxxxxx
$ echo $?
2
☝️ exitcode is 2 as the operation failed
$ vtex install [email protected]
20:49:31.889 - error: Installation failed!
20:49:31.890 - error: Failed to list versions and states by timestamp for notexist.nosuchapp: invalid character '<' looking for beginning of value
20:49:31.890 - warn: The following app was not installed: [email protected]
$ echo $?
2
☝️ exitcode is 2 as the operation failed
$ vtex deploy [email protected]
20:51:17.877 - error: Error patching publication metadata in new index: Error getting publication index and history: Error reading new publication index: App not published: notexist.nosuchapp
20:51:17.920 - info: Logged into xxxxxxxxxxx as [email protected] at workspace master
20:51:17.920 - info: Switched from xxxxxxxxxxx to xxxxxxxxxxx
$ echo $?
2
☝️ exitcode is 2 as the operation failed
$ vtex deploy [email protected]
21:00:41.286 - error: Error patching publication metadata in new index: Error getting version in publication index: Version not published yet
$ echo $?
2
☝️ exitcode is 2 as the operation failed
Current Behavior
$ vtex publish
OK
$ vtex publish
20:55:33.775 - error: Publishing failed. [email protected]
20:55:33.828 - error: App build failed with message: Version '1.0.8' of app 'xxxxxxxxxxxxx.xxxxxxxxxxxxxxxx' has already been published.
20:55:33.829 - error: Failed to publish [email protected]
20:55:33.873 - info: Logged into xxxxxxxxxxx as [email protected] at workspace master
20:55:33.873 - info: Switched from xxxxxxxxxxx to xxxxxxxxxxx
$ echo $?
0
☝️ exitcode is 0 although the operation failed
$ vtex install [email protected]
20:49:31.889 - error: Installation failed!
20:49:31.890 - error: Failed to list versions and states by timestamp for notexist.nosuchapp: invalid character '<' looking for beginning of value
20:49:31.890 - warn: The following app was not installed: [email protected]
$ echo $?
0
☝️ exitcode is 0 although the operation failed
$ vtex deploy [email protected]
20:51:17.877 - error: Error patching publication metadata in new index: Error getting publication index and history: Error reading new publication index: App not published: notexist.nosuchapp
20:51:17.920 - info: Logged into xxxxxxxxxxx as [email protected] at workspace master
20:51:17.920 - info: Switched from xxxxxxxxxxx to xxxxxxxxxxx
$ echo $?
0
☝️ exitcode is 0 although the operation failed
$ vtex deploy [email protected]
21:00:41.286 - error: Error patching publication metadata in new index: Error getting version in publication index: Version not published yet
$ echo $?
0
☝️ exitcode is 0 although the operation failed
Context
Any CLI should exit with non 0 exit code if the operation failed. We're automating deployments and currently we work around this by parsing the output -> not always accurate
Your Environment
Version used: 4.0.4
The text was updated successfully, but these errors were encountered:
bdudabeecoded
changed the title
CLI exists with 0 even if operation failed
CLI exits with exitcode 0 even if operation failed
Jul 3, 2024
Expected Behavior
vtex publish|install|deploy
should exit with code <> 0 (e.g. exitcode 2) when operation failedvtex link --no-watch
should exit with code <> 0 (e.g. exitcode 2) when operation failed☝️ exitcode is 2 as the operation failed
☝️ exitcode is 2 as the operation failed
☝️ exitcode is 2 as the operation failed
☝️ exitcode is 2 as the operation failed
Current Behavior
☝️ exitcode is 0 although the operation failed
☝️ exitcode is 0 although the operation failed
☝️ exitcode is 0 although the operation failed
☝️ exitcode is 0 although the operation failed
Context
Any CLI should exit with non 0 exit code if the operation failed. We're automating deployments and currently we work around this by parsing the output -> not always accurate
Your Environment
Version used: 4.0.4
The text was updated successfully, but these errors were encountered: