Skip to content

Commit ddfb66b

Browse files
authored
Merge pull request #359 from MartinSGill/issue/358
Updated build script to test for project asset files
2 parents c080d18 + c1c56a1 commit ddfb66b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

PowerShellEditorServices.build.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ function NeedsRestore($rootPath) {
9494
# path (like "src" or "test") is greater than the number of
9595
# obj\project.assets.json files found under that path, implying
9696
# that those folders have not yet been restored.
97-
return (Get-ChildItem $rootPath).Length -gt (Get-ChildItem "$rootPath\*\obj\project.assets.json").Length
97+
$projectAssets = (Get-ChildItem "$rootPath\*\obj\project.assets.json")
98+
return ($projectAssets -eq $null) -or ((Get-ChildItem $rootPath).Length -gt $projectAssets.Length)
9899
}
99100

100101
task Restore -If { "Restore" -in $BuildTask -or (NeedsRestore(".\src")) -or (NeedsRestore(".\test")) } -Before Clean, Build, BuildHost, Test {

0 commit comments

Comments
 (0)