Skip to content

Commit 950d0b2

Browse files
CR feedback
1 parent 8cc5f47 commit 950d0b2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/dsc/psresourceget.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ function SatisfiesVersion {
218218
[string]$versionRange
219219
)
220220

221-
Add-Type -AssemblyName "$PSScriptRoot/dependencies/NuGet.Versioning.dll"
221+
Add-Type -Path "$PSScriptRoot/dependencies/NuGet.Versioning.dll"
222222

223223
try {
224224
$versionRangeObj = [NuGet.Versioning.VersionRange]::Parse($versionRange)
@@ -629,7 +629,7 @@ function SetOperation {
629629
}
630630
}
631631

632-
if ($null -eq $rep) {
632+
if ($null -eq $rep -and $inputObj._exist -ne $false) {
633633
Register-PSResourceRepository @splatt
634634
}
635635
else {

test/DscResource/PSResourceGetDSCResource.Tests.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ function SetupDsc {
77
throw "DSC_ROOT environment variable is not set or path does not exist."
88
}
99

10-
$env:PATH += ";$script:DSC_ROOT"
10+
$pathSeparator = [System.IO.Path]::PathSeparator
11+
12+
$env:PATH += "$pathSeparator$script:DSC_ROOT"
1113

1214
# Ensure DSC v3 is available
1315
if (-not (Get-Command -name dsc -CommandType Application -ErrorAction SilentlyContinue)) {

0 commit comments

Comments
 (0)