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
|
if [[ "$SECRET" == *"password"* ]]; then
|
||||||
PWGEN="${abra__cmd_:-pwqgen}"
|
PWGEN="${abra__cmd_:-pwqgen}"
|
||||||
else
|
else
|
||||||
PWGEN=${abra__cmd_:-pwgen -n "$LENGTH"}
|
PWGEN=${abra__cmd_:-pwgen -s "$LENGTH" 1}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$SECRET" ] || [ -z "$VERSION" ]; then
|
if [ -z "$SECRET" ] || [ -z "$VERSION" ]; then
|
||||||
error "Required arguments missing"
|
error "Required arguments missing"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PW=$($PWGEN)
|
PW=$($PWGEN|tr -d "\n")
|
||||||
|
|
||||||
success "Password: $PW"
|
success "Password: $PW"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user