fix: do not use installer script basename in temporary download directory template

The script may be called anything by the user or curl or bash, so to be a little
safer we instead just use a static string for the temporary directory name.
This commit is contained in:
CJ van den Berg 2025-10-29 17:07:07 +01:00
parent 5678d73c4f
commit 9ed527779e
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -204,7 +204,7 @@ if [ "$debug" -eq 1 ]; then
fi
url="https://github.com/$repo/releases/download/$version/$filename.$ext"
tmp_path="$(mktemp -t -d "$(basename "$0").XXXXX")"
tmp_path="$(mktemp -t -d "flow-control-installer.XXXXX")"
if [ -z "$tmp_path" ] || [ "$tmp_path" = "/" ]; then
echo "failed to create a temporary download directory"