File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -338,9 +338,17 @@ case "${COMMAND}" in
338338 --scan-history) scan_with_fn_or_die " scan_history" " $@ " ;;
339339 --list)
340340 if [ ${GLOBAL} -eq 1 ]; then
341- git config --global --get-regex secrets.*
341+ RESULT=1
342+ if git config --global --get-regex --type path " ^secrets\.providers$" ; then RESULT=0; fi
343+ if git config --global --get-regex " ^secrets\.patterns$" ; then RESULT=0; fi
344+ if git config --global --get-regex " ^secrets\.allowed$" ; then RESULT=0; fi
345+ [ $RESULT -eq 0 ]
342346 else
343- git config --get-regex secrets.*
347+ RESULT=1
348+ if git config --get-regex --type path " ^secrets\.providers$" ; then RESULT=0; fi
349+ if git config --get-regex " ^secrets\.patterns$" ; then RESULT=0; fi
350+ if git config --get-regex " ^secrets\.allowed$" ; then RESULT=0; fi
351+ [ $RESULT -eq 0 ]
344352 fi
345353 ;;
346354 --install)
Original file line number Diff line number Diff line change @@ -311,6 +311,14 @@ load test_helper
311311 [ $status -eq 0 ]
312312}
313313
314+ @test " Expands ~ in providers" {
315+ repo_run git-secrets --add-provider -- ' ~/test'
316+ [ $status -eq 0 ]
317+ repo_run git-secrets --list
318+ [ $status -eq 0 ]
319+ echo " $output " | grep -F " ${HOME} /test"
320+ }
321+
314322@test " --recursive cannot be used with SCAN_*" {
315323 repo_run git-secrets --scan -r --cached
316324 [ $status -eq 1 ]
You can’t perform that action at this time.
0 commit comments