Repository navigation
scoop-gen(.sh) : whitespace bugs #7404
Description
Activity
Additionally, I noticed how the checksums file includes windows_arm64 while scoop-gen has just amd64 and 386.
Alternatively, for handling two or more positional parameters, after word splitting, including null bytes.
while :; do if [[ -n "${1:?}" ]]; then tagname="$1"; shift; break; else shift; fi; done
jsonfile="${*:?}"; [[ -f "${jsonfile}" ]] || { echo "scoop-gen: cli args"; exit 1;}Thx
- addedpriority-3Affects a small number of users or is largely cosmeticAffects a small number of users or is largely cosmetichelp wantedContributions welcomeContributions welcomeand removedneeds-triageneeds to be reviewedneeds to be reviewed
on May 3, 2023 Hi, we've not recommended that people install from our own scoop bucket since late 2020: #2478
Since gh can be installed from the "main" bucket, ours was essentially deprecated and updated only for people who were already using it. Since lately, we have stopped updating it: #7324
So instead of maintaining the scoop-gen script further, we will be deleting it instead. I'll close this issue when that's done.
- addedcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsand removedhelp wantedContributions welcomeContributions welcome
on May 4, 2023 Okay
Describe the bug
Filenames can include whitespace, so when word splitting is used erroneous values can be assigned to the script's positional parameters.
A clear and concise description of what the bug is. Include version by typing
gh --version.(installed from dnf:)
gh version 2.27.0 (2023-04-11)
https://github.com/cli/cli/releases/tag/v2.27.0
Steps to reproduce the behavior
git clone 'https://github.com/cli/cli'bug 1:
Note whitespace in the filename.
clear; set -x; f="~/json file"; cat ~/gh_2.4.0_checksums.txt | ./cli-2.27.0/script/scoop-gen v2.4.0 $f; set -bug 2:
clearset -xset --set -- '' 'foo'echo "$#"echo "$@"printf '%s' "$1" | od -tx1zprintf '%s' "$1" | cat -Aenecho "${1?}"# tests for variable unsetecho "${1:?}"# tests for variable unset or nullset -bug 1:
bug 2:
bug 1:
bug 2:
Patches
Bug 1: add near top of file
[[ "$#" -eq 2 ]] || { echo "scoop-gen: cli args"; exit 1;}Bug 2: at lines 5 and 6, add some colons before the question marks
tagname="${1:?}"jsonfile="${2:?}"