Files
dokku/docker/usr/local/bin/nixpacks
2025-03-09 17:22:53 -04:00

21 lines
370 B
Bash

#!/usr/bin/env bash
set -eo pipefail
[[ $TRACE ]] && set -x
main() {
declare desc="re-runs nixpacks commands as sudo"
local NIXPACKS_BIN=""
if [[ -x "/usr/bin/nixpacks" ]]; then
NIXPACKS_BIN="/usr/bin/nixpacks"
fi
if [[ -z "$NIXPACKS_BIN" ]]; then
echo "! No nixpacks binary found" 1>&2
exit 1
fi
sudo -E "$NIXPACKS_BIN" "$@"
}
main "$@"