Skip to content

Bug: AZD deletes the package when running azd deploy --from-package #5444

@vhvb1989

Description

@vhvb1989

AZD is automatically deleting the package after deploying, see: cli/azd/pkg/project/service_target_appservice.go in line 84.
The line defer os.Remove(packageOutput.PackagePath) makes sure do delete the folder holding the package.
This works fine when AZD is the one who creates and owns the package, but it is not OK when AZD is using a package referenced by customers with a flag, as that package is not owned by AZD and users are not expecting to see the package disappearing.

As a workaround, users must first create a copy of a package if they don't want to lose it after deploying.

AZD should only delete the file when the flag is not used as part of azd deploy

Metadata

Metadata

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions