-
Notifications
You must be signed in to change notification settings - Fork 82
fix(deps-dev): Ensure user-scoped pipx
installs and reliable version checks for pipx
packages.
#1320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(deps-dev): Ensure user-scoped pipx
installs and reliable version checks for pipx
packages.
#1320
Changes from 7 commits
e6817d8
1701f05
896a9c4
12fc072
24adfec
84c01bf
22ec79e
59de3b0
611596a
ac5ec93
d547a7c
6bea8cf
7523533
4640164
7a371fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -12,17 +12,22 @@ fi | |||||||||||||
# We lock to version 3.44.0 to avoid https://github.com/y-scope/clp-ffi-js/issues/110 | ||||||||||||||
readonly required_version="3.44.0" | ||||||||||||||
|
||||||||||||||
package_preinstalled=0 | ||||||||||||||
if ! command -v task >/dev/null 2>&1; then | ||||||||||||||
go_task_bin="$(command -v task 2>/dev/null || true)" | ||||||||||||||
if [ -n "${go_task_bin}" ]; then | ||||||||||||||
package_preinstalled=0 | ||||||||||||||
echo "Preinstalled Task found at: ${go_task_bin}" | ||||||||||||||
else | ||||||||||||||
package_preinstalled=1 | ||||||||||||||
pipx install --force "go-task-bin==${required_version}" | ||||||||||||||
pipx ensurepath | ||||||||||||||
go_task_bin="${PIPX_BIN_DIR:-$HOME/.local/bin}/task" | ||||||||||||||
echo "Pipx Task installed at: ${go_task_bin}" | ||||||||||||||
fi | ||||||||||||||
|
||||||||||||||
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)" | ||||||||||||||
task_version=$(task --silent --taskfile "${script_dir}/print-go-task-version.yaml") | ||||||||||||||
if [[ "${task_version}" != "${required_version}" ]]; then | ||||||||||||||
echo "Error: Task version ${task_version} is currently unsupported (must be" \ | ||||||||||||||
installed_version=$(${go_task_bin} --silent --taskfile "${script_dir}/print-go-task-version.yaml") | ||||||||||||||
if [[ "${installed_version}" != "${required_version}" ]]; then | ||||||||||||||
echo "Error: Task version ${installed_version} is currently unsupported (must be" \ | ||||||||||||||
Comment on lines
+29
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quote the resolved binary when invoking. Prevents breakage if the path contains spaces. -installed_version=$(${go_task_bin} --silent --taskfile "${script_dir}/print-go-task-version.yaml")
+installed_version=$("${go_task_bin}" --silent --taskfile "${script_dir}/print-go-task-version.yaml") 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||
"${required_version})." | ||||||||||||||
|
||||||||||||||
if ((0 == "${package_preinstalled}")); then | ||||||||||||||
|
@@ -35,3 +40,5 @@ if [[ "${task_version}" != "${required_version}" ]]; then | |||||||||||||
|
||||||||||||||
exit 1 | ||||||||||||||
fi | ||||||||||||||
|
||||||||||||||
echo "Task version ${installed_version} installed at ${go_task_bin} satisfies version requirements." |
Uh oh!
There was an error while loading. Please reload this page.