Skip to content

Commit f6247cb

Browse files
wbrezaCopilot
andcommitted
fix: log cleanup errors, add cspell override for copylocks
- Wrap defer Cleanup() in closure to log errors instead of silently dropping - Add copylocks to cspell overrides for project.go Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 097ed07 commit f6247cb

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

cli/azd/.vscode/cspell.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,9 @@ overrides:
371371
- filename: pkg/infra/provisioning/bicep/local_preflight.go
372372
words:
373373
- actioned
374+
- filename: pkg/project/project.go
375+
words:
376+
- copylocks
374377
- filename: pkg/ext/models.go
375378
words:
376379
- unvalidated

cli/azd/pkg/ext/hooks_runner.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,11 @@ func (h *HooksRunner) execHook(
212212
// script temp files). Deferred before Prepare so cleanup runs
213213
// even if Prepare fails partway through. Cleanup is safe to
214214
// call when Prepare was not called or created no resources.
215-
defer executor.Cleanup(ctx)
215+
defer func() {
216+
if cErr := executor.Cleanup(ctx); cErr != nil {
217+
log.Printf("warning: cleanup failed for hook '%s': %v\n", hookConfig.Name, cErr)
218+
}
219+
}()
216220

217221
// Prepare (unified — venv/deps for Python, pwsh detection for
218222
// PowerShell, inline temp file creation for Bash/PowerShell hooks).

0 commit comments

Comments
 (0)