@@ -14,6 +14,7 @@ Write-Host "`n### Extension Version: $($script:PackageJson.version) Extension Na
1414
1515# region Utility tasks
1616
17+ # TODO: This needs to be a function, not a task.
1718task ResolveEditorServicesPath - Before CleanEditorServices, BuildEditorServices, TestEditorServices, Package {
1819
1920 $script :psesRepoPath = `
@@ -24,7 +25,7 @@ task ResolveEditorServicesPath -Before CleanEditorServices, BuildEditorServices,
2425 " $PSScriptRoot /../PowerShellEditorServices/"
2526 }
2627
27- if (! (Test-Path $script :psesRepoPath )) {
28+ if (! (Test-Path " $script :psesRepoPath /PowerShellEditorServices.build.ps1 " )) {
2829 # Clear the path so that it won't be used
2930 Write-Warning " `n The PowerShellEditorServices repo cannot be found at path $script :psesRepoPath `n "
3031 $script :psesRepoPath = $null
@@ -172,14 +173,9 @@ task UpdatePackageJson {
172173}
173174
174175task Package UpdateReadme, {
175-
176- if ($script :psesBuildScriptPath ) {
176+ if ($script :psesBuildScriptPath -or $env: TF_BUILD ) {
177177 Write-Host " `n ### Copying PowerShellEditorServices module files" - ForegroundColor Green
178178 Copy-Item - Recurse - Force ..\PowerShellEditorServices\module\* .\modules
179- } elseif (Test-Path .\PowerShellEditorServices) {
180- Write-Host " `n ### Moving PowerShellEditorServices module files" - ForegroundColor Green
181- Move-Item - Force .\PowerShellEditorServices\* .\modules
182- Remove-Item - Force .\PowerShellEditorServices
183179 } else {
184180 throw " Unable to find PowerShell EditorServices"
185181 }
0 commit comments