-z -> -n to validate that password ain't empty

This commit is contained in:
Alexandre Aubin 2021-09-06 01:02:43 +02:00 committed by GitHub
parent 699004bdc7
commit 7469e00fff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ validate__arg8() {
# SPECIFIC SETTERS FOR TOML SHORT KEYS
#=================================================
set__arg8() {
if [ -z "${arg8}" ]
if [ -n "${arg8}" ]
then
python -c "import crypt; print(crypt.crypt(\"${arg8}\", \"\$6\$saltsalt\$\"))" > $final_path/password
ynh_print_info "The hash of your password has been registered in $final_path/password"