Skip to content

Commit f2a971e

Browse files
CopilotJeffreyCAhemarinaCopilot
authored andcommitted
Use Windows PowerShell daily install suggestion for package-manager update errors (Azure#7293)
* Initial plan * fix: use platform-specific daily install suggestion Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/azure-dev/sessions/5e14a4d6-7532-45e9-97f5-480c97748600 * chore: finalize update suggestion fix Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/azure-dev/sessions/5e14a4d6-7532-45e9-97f5-480c97748600 * chore: revert unrelated extension dependency changes Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/azure-dev/sessions/5e14a4d6-7532-45e9-97f5-480c97748600 * refactor: remove DailyInstallCmd and inline Windows PowerShell command Co-authored-by: hemarina <104857065+hemarina@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/azure-dev/sessions/3d6160f5-8d5e-4172-ac95-815cc901ec09 * Update cli/azd/cmd/update.go Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: inline install-azd.ps1 URL to fix undefined update.InstallScriptURL Co-authored-by: hemarina <104857065+hemarina@users.noreply.github.com> Agent-Logs-Url: https://github.com/Azure/azure-dev/sessions/91766c4d-c85a-4d88-8d25-de13ae263fc9 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: JeffreyCA <9157833+JeffreyCA@users.noreply.github.com> Co-authored-by: hemarina <104857065+hemarina@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0794d2e commit f2a971e

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

cli/azd/cmd/update.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,8 @@ func (a *updateAction) Run(ctx context.Context) (*actions.ActionResult, error) {
201201
Err: fmt.Errorf("daily builds aren't available via %s", installedBy),
202202
Suggestion: fmt.Sprintf(
203203
"Uninstall first with: %s\nThen install daily with: "+
204-
"curl -fsSL https://aka.ms/install-azd.sh | bash -s -- --version daily",
204+
"powershell -ex AllSigned -c \"Invoke-RestMethod 'https://aka.ms/install-azd.ps1'"+
205+
" -OutFile 'install-azd.ps1'; ./install-azd.ps1 -Version 'daily'\"",
205206
uninstallCmd),
206207
},
207208
}

cli/azd/docs/design/azd-update.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ Switching between a package manager and direct installs is **not supported** via
306306

307307
| Scenario | Guidance |
308308
|----------|----------|
309-
| Package manager → daily | Show: "Daily builds aren't available via {brew/winget/choco}. Uninstall with `{uninstall command}`, then install daily with `curl -fsSL https://aka.ms/install-azd.sh \| bash -s -- --version daily`" |
309+
| Package manager → daily | Show: "Daily builds aren't available via {brew/winget/choco}. Uninstall with `{uninstall command}`, then install daily with the platform-appropriate daily install command (`install-azd.ps1` on Windows, `install-azd.sh` on Linux/macOS)" |
310310
| Script/daily → package manager | Show: "To switch to {brew/winget/choco}, first uninstall the current version, then install via your package manager." |
311311

312312
This avoids the silent symlink overwrite problem that exists today with conflicting install methods.
@@ -377,4 +377,3 @@ The startup "out of date" warning banner is suppressed during `azd update` (stal
377377
When the auto-update elevation warning is shown ("azd version X.Y.Z has been downloaded. Run 'azd update' to apply it."), the "out of date" warning is also suppressed to avoid showing two redundant warnings about the same condition.
378378

379379
---
380-

0 commit comments

Comments
 (0)