Commit be35b9d2 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Fix missing command in docker wrapper

parent 6ac1ec0d
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ until [[ $# -eq 0 ]]; do
done

cmd_run() {
	ARG+=(run)

	# Ensure --rm is in args if --detach is not
	until [[ $# -eq 0 ]]; do
		case $1 in
@@ -47,14 +49,15 @@ cmd_run() {
	done
}

case $CMD in
case ${CMD-} in
	run) cmd_run "$@" ;;
	*) ARG=( "$@" ) ;;
	"") ARG=( "$@" ) ;;
	*) ARG=( "$CMD" "$@" ) ;;
esac

for path in $(type -ap docker); do
	[[ $path -ef $0 ]] && continue
	exec $path "${OPTIONS[@]}" "$CMD" "${ARG[@]}"
	exec $path "${OPTIONS[@]}" "${ARG[@]}"
done

echo >&2 "No 'docker' found on PATH"