Explorar el Código

tfa property might be a boolean, add `?` for optional

https://stedolan.github.io/jq/manual/#OptionalObjectIdentifier-Index:.foo? “Optional Object Identifier-Index”

//cc @goto-bus-stop
Artur Paikin hace 6 años
padre
commit
094e497741
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      bin/release

+ 1 - 1
bin/release

@@ -37,7 +37,7 @@ if ! which jq; then
   exit 1
 fi
 
-perm="$(npm profile get --json | jq .tfa.mode -r)"
+perm="$(npm profile get --json | jq .tfa.mode? -r)"
 if [ "$perm" == "auth-and-writes" ]; then
   echo "Two-factor auth is enabled for publishing. This doesn't work well with lerna."
   echo "Temporarily switch to authentication-only 2FA using the link below:"