Use one line and strip newlines on generation
This commit is contained in:
parent
28b2d8ecc7
commit
25fe6808ad
4
abra
4
abra
@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user