Skip to content

Commit

Permalink
improved messaging for cli updates via lando update
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Nov 21, 2024
1 parent fcbe7a3 commit 04cb8ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Fixed `lando update` so it removes lingering `lando.exe`s in the update bin directory
* Improved `lando shellenv` so that it always includes `~/.lando/bin` and includes it first
* Improved messaging on `lando shellenv --add`
* Improved messaging on `lando update` for `@lando/cli`

## v3.23.11 - [November 20, 2024](https://github.com/lando/core/releases/tag/v3.23.11)

Expand Down
5 changes: 4 additions & 1 deletion lib/updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ module.exports = class UpdateManager {
// refresh the "symlink"
require('../utils/link-bin')(this._cli.installPath, dest, {debug: this.debug});

// set a good default update messag
task.title = `Updated @lando/cli to ${version}`;

// if lando.exe exists on windows in the install path then remove it so the link has primacy
// in PATHEXT hierarchy
if (process.platform === 'win32' && fs.existsSync(path.join(this._cli.installPath, filename))) {
Expand All @@ -276,14 +279,14 @@ module.exports = class UpdateManager {
const rcFile = require('../utils/get-shell-profile')();
require('../utils/update-shell-profile')(rcFile, shellEnv);
this.debug('added %o to %o', shellEnv, rcFile);
task.title `${task.title}. Start a new terminal session to use the updated ${color.bold(`lando`)}`;

// otherwis i guess do something else?
// @TODO: throw a warning?
} else this.debug('could not add %o to PATH!', binPaths);
}

// finish
task.title = `Updated @lando/cli to ${version}`;
resolve(data);
});
// handle errors
Expand Down

0 comments on commit 04cb8ed

Please sign in to comment.