Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## To Be Released

* fix(dist): improve version detection in `install.sh`

## 1.43.0

* feat(databases next generation): add database plan upgrade command
Expand Down
4 changes: 2 additions & 2 deletions dists/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ main() {
if [ -x "$target" ] && [ -z "$yes_to_overwrite" ] ; then
export DISABLE_UPDATE_CHECKER=true
# Use cut's short parameter to be compatible with MacOS: https://ss64.com/osx/cut.html
new_version=$($exe_path --version | cut -d' ' -f4)
old_version=$("$target" --version | cut -d' ' -f4)
new_version=$($exe_path --version | cut -d' ' -f3)
old_version=$("$target" --version | cut -d' ' -f3)
Comment on lines +181 to +182

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cut -d' ' -f3 is still quite brittle because it assumes the version will always be the 3rd whitespace-delimited token. Since --version output formatting can change (extra words, different binary name, etc.), consider extracting the last token instead (e.g., via awk '{print $NF}') or a simple semver regex, to make version detection more robust.

Copilot uses AI. Check for mistakes.
warn "Scalingo client is already installed (version ${old_version})\n"

if ! ask "Do you want to replace it with version ${new_version}?" ; then
Expand Down