mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
4d231af19d
* Tell git to ignore directory ownership in docker * Show usage instead of an error when no arguments are passed into docker
13 lines
374 B
Bash
Executable file
13 lines
374 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# Parse the last argument into an array of extra_args.
|
|
mapfile -t extra_args < <(bash -c "for arg in ${*: -1}; do echo \$arg; done")
|
|
|
|
# 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
|