Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

NugetPackage resource: idempotency issue #37

Open
loshurik opened this issue Dec 14, 2017 · 0 comments
Open

NugetPackage resource: idempotency issue #37

loshurik opened this issue Dec 14, 2017 · 0 comments

Comments

@loshurik
Copy link

I have a DSC with resources:

PackageManagementSource NugetRepository
{
Ensure = "Present"
Name = "TrDevOpsNuget"
ProviderName= "Nuget"
SourceUri = "http://my.internal.nuget.repo"
InstallationPolicy ="Trusted"
}
NugetPackage Agent
{
DependsOn = "[PackageManagementSource]NugetRepository"
Name = MyPackage
Source = "http://my.internal.nuget.repo"
Ensure = "Present"
DestinationPath = "C:\Temp"
}
It works OK for the first time and fails for next attempts.
At the first run the package gets downloaded, everything works as expected.
At the second run I expect to get "the state is OK, no changes needed"
but NugetPackage throws this:
Source 'C:\Temp\MyPackage.1.2.0.279054\MyPackage.1.2.0.279054.nupkg' is not one of the registered sources in 'NuGet' provider.
Source 'C:\Temp\MyPackage.1.2.0.279054\MyPackage.1.2.0.279054.nupkg' is a file path.
Package 'MyPackage.' not found in the node
Ensure of MyPackage package is Absent
Resource 'MyPackage' is not in the desired state. Required Ensure is 'Present' and actual Ensure is 'Absent'

Any idea?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant