diff options
author | typebrook <typebrook@gmail.com> | 2020-05-09 00:58:03 +0800 |
---|---|---|
committer | typebrook <typebrook@gmail.com> | 2020-05-09 00:58:03 +0800 |
commit | 39d89791eb3a19f8ac2053fe24c24a2711e33377 (patch) | |
tree | 2684950afc1524cf3900051cff394d0cc476c29d | |
parent | 2331663bbe28c789cf977c627e5ec9faa06043c7 (diff) |
Allow remove token
-rwxr-xr-x | gist | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -193,7 +193,7 @@ _configure() { | |||
193 | if [[ $key == 'user' ]]; then | 193 | if [[ $key == 'user' ]]; then |
194 | [[ -z $value ]] && echo 'Must specify username' >&2 && return 1 | 194 | [[ -z $value ]] && echo 'Must specify username' >&2 && return 1 |
195 | elif [[ $key == 'token' ]]; then | 195 | elif [[ $key == 'token' ]]; then |
196 | [[ ${#value} -ne 40 && ! $value =~ ^(\$|\`) ]] && echo 'Invalid token format, it is not 40 chars' >&2 && return 1 | 196 | [[ -n $value && ${#value} -ne 40 && ! $value =~ ^(\$|\`) ]] && echo 'Invalid token format, it is not 40 chars' >&2 && return 1 |
197 | elif [[ $key =~ ^(auto_sync|show_untagged)$ ]]; then | 197 | elif [[ $key =~ ^(auto_sync|show_untagged)$ ]]; then |
198 | [[ ! $value =~ ^(true|false)$ ]] && echo "$key must be either true or false" >&2 && return 1 | 198 | [[ ! $value =~ ^(true|false)$ ]] && echo "$key must be either true or false" >&2 && return 1 |
199 | elif [[ $key == 'protocol' ]]; then | 199 | elif [[ $key == 'protocol' ]]; then |