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

NugetPackage resource: idempotency issue #37

@loshurik

Description

@loshurik

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions