mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Add ynh_die helper to print error message and exit
This commit is contained in:
parent
be9d744f3c
commit
f065ac6baa
1 changed files with 6 additions and 0 deletions
6
data/helpers.d/print
Normal file
6
data/helpers.d/print
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Print a message to stderr and exit
|
||||||
|
# usage: ynh_die MSG [RETCODE]
|
||||||
|
ynh_die() {
|
||||||
|
echo "$1" 1>&2
|
||||||
|
exit "${2:-1}"
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue