Use one line and strip newlines on generation

This commit is contained in:
Luke Murphy 2020-11-08 16:34:26 +01:00
parent 28b2d8ecc7
commit 25fe6808ad
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

4
abra
View File

@ -719,14 +719,14 @@ sub_app_secret_generate(){
if [[ "$SECRET" == *"password"* ]]; then
PWGEN="${abra__cmd_:-pwqgen}"
else
PWGEN=${abra__cmd_:-pwgen -n "$LENGTH"}
PWGEN=${abra__cmd_:-pwgen -s "$LENGTH" 1}
fi
if [ -z "$SECRET" ] || [ -z "$VERSION" ]; then
error "Required arguments missing"
fi
PW=$($PWGEN)
PW=$($PWGEN|tr -d "\n")
success "Password: $PW"