olakai-cli 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3692,7 +3692,17 @@ async function resolveHost(profileName, options, interactive) {
3692
3692
  const file = readProfilesFile();
3693
3693
  const existing = file.profiles[profileName];
3694
3694
  if (existing?.host) {
3695
- return existing.host;
3695
+ if (!interactive || isTokenValid()) {
3696
+ return existing.host;
3697
+ }
3698
+ const keep = await promptUser(
3699
+ `
3700
+ Connect to ${existing.host}? [Y/n] (or pick a different workspace): `
3701
+ );
3702
+ if (keep.trim().toLowerCase() !== "n") {
3703
+ return existing.host;
3704
+ }
3705
+ console.log("");
3696
3706
  }
3697
3707
  if (!interactive) {
3698
3708
  throw new InitAbortedError(