|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (1)
View Page HistoryIf no arguments is set on command {{undeploy}}, all artifacts are undeployed. In this case a confirmation is expected, except if the flag 'yes' is set on the command line. A confirmation message is displayed in the mode 'console', except is the flag 'yes' is set on the command line.
h3. Exit the mode 'console'
To exit the mode 'console', use the command 'exit'. If a number is set as argument, it is used as return code otherwise, the return code 0 is used:
{code}
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit
> echo $?
0
> ./petals-cli.sh -C
Type 'help' for help.
------------------------------------------------------------------------------
petals-cli> exit 1
> echo $?
1
{code}
h3. Interrupt a flow of commands
A flow of commands can be interrupted using the command 'exit'. If a number is set as argument, it is used as return code. The argument 'lastErrorCode' is used as return code value of the last executed command. Otherwise the return code 0 is returned to the shell:
{code}
> ./petals-cli.sh -y -f - << EOF
deploy /tmp/my-artifact.zip
exit lastErrorCode
EOF
{code}
h3. Ending a flow of commands
When the end of a flow of commands is reached, if the last command is not 'exit', the command 'exit lastErrorCode' is implicitly executed:
{code}
> ./petals-cli.sh -y -f - << EOF
deploy /tmp/my-artifact.zip
EOF
echo $?
0
{code}