aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-05-09 00:58:03 +0800
committertypebrook <typebrook@gmail.com>2020-05-09 00:58:03 +0800
commit39d89791eb3a19f8ac2053fe24c24a2711e33377 (patch)
tree2684950afc1524cf3900051cff394d0cc476c29d
parent2331663bbe28c789cf977c627e5ec9faa06043c7 (diff)
Allow remove token
-rwxr-xr-xgist2
1 files changed, 1 insertions, 1 deletions
diff --git a/gist b/gist
index d07ed3c..94ae08a 100755
--- a/gist
+++ b/gist
@@ -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