pulumi icon indicating copy to clipboard operation
pulumi copied to clipboard

auto.Stack.Destroy() not generating proper command if debug.LoggingOptions with Debug=true is passed

Open tomnislav opened this issue 8 months ago • 1 comments

What happened?

Getting Error: unknown flag: --debug because command generated puts --debug flag before destroy command. Up() function doesnt seem to have this issue as it calls debug.AddArgs(&upOpts.DebugLogOpts, args) after up command is appended. Destroy() does it before.

Example

_, pulumiErr := sampleStack.Destroy(
		context.Background(),
		optdestroy.DebugLogging(debug.LoggingOptions{
			Debug:       true,
		}),
	)

Output of pulumi about

pulumi about

CLI Version 3.153.1 Go Version go1.23.6 Go Compiler gc

Plugins KIND NAME VERSION language go 3.153.1

Host OS debian Version 11.11 Arch aarch64

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

tomnislav avatar Mar 07 '25 17:03 tomnislav