mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-14 00:47:21 +00:00
* Tell git to ignore directory ownership in docker * Show usage instead of an error when no arguments are passed into docker
This commit is contained in:
parent
d53b83b58e
commit
4d231af19d
1 changed files with 8 additions and 1 deletions
|
@ -3,4 +3,11 @@
|
||||||
# Parse the last argument into an array of extra_args.
|
# Parse the last argument into an array of extra_args.
|
||||||
mapfile -t extra_args < <(bash -c "for arg in ${*: -1}; do echo \$arg; done")
|
mapfile -t extra_args < <(bash -c "for arg in ${*: -1}; do echo \$arg; done")
|
||||||
|
|
||||||
/usr/bin/trufflehog "${@: 1: $#-1}" "${extra_args[@]}"
|
# Directories might be owned by a user other than root
|
||||||
|
git config --global --add safe.directory '*'
|
||||||
|
|
||||||
|
if [[ $# -eq 0 ]]; then
|
||||||
|
/usr/bin/trufflehog --help
|
||||||
|
else
|
||||||
|
/usr/bin/trufflehog "${@: 1: $#-1}" "${extra_args[@]}"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue