소스 검색

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 6 년 전
부모
커밋
094e497741
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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:"