Skip to content

Commit 7bd681d

Browse files
committed
Revert hack removal
1 parent 9b34339 commit 7bd681d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

tests/build.tests.ps1

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ Describe 'Build' {
55
# Hack for GH Actions
66
# For some reason, the TestModule build process create the output in the project root
77
# and not relative to it's own build file.
8-
#if ($env:GITHUB_ACTION) {
9-
#$script:testModuleOutputPath = [IO.Path]::Combine($env:BHProjectPath, 'Output', 'TestModule', '0.1.0')
10-
#} else {
11-
$script:testModuleSource = [IO.Path]::Combine($PSScriptRoot, 'TestModule')
12-
$script:testModuleOutputPath = [IO.Path]::Combine($script:testModuleSource, 'Output', 'TestModule', '0.1.0')
13-
#}
8+
if ($env:GITHUB_ACTION) {
9+
$script:testModuleSource = [IO.Path]::Combine($PSScriptRoot, 'TestModule')
10+
$script:testModuleOutputPath = [IO.Path]::Combine($env:BHProjectPath, 'Output', 'TestModule', '0.1.0')
11+
} else {
12+
$script:testModuleSource = [IO.Path]::Combine($PSScriptRoot, 'TestModule')
13+
$script:testModuleOutputPath = [IO.Path]::Combine($script:testModuleSource, 'Output', 'TestModule', '0.1.0')
14+
}
1415
}
1516

1617
Context 'Compile module' {
@@ -20,7 +21,7 @@ Describe 'Build' {
2021
Write-Host "OutputPath: $script:testModuleOutputPath"
2122

2223
# build is PS job so psake doesn't freak out because it's nested
23-
Start-Job -ScriptBlock {
24+
Start-Job -Scriptblock {
2425
$global:PSBuildCompile = $true
2526
./build.ps1 -Task Build
2627
} -WorkingDirectory $script:testModuleSource | Wait-Job
@@ -71,7 +72,7 @@ Describe 'Build' {
7172
Context 'Dot-sourced module' {
7273
BeforeAll {
7374
# build is PS job so psake doesn't freak out because it's nested
74-
Start-Job -ScriptBlock {
75+
Start-Job -Scriptblock {
7576
$global:PSBuildCompile = $false
7677
./build.ps1 -Task Build
7778
} -WorkingDirectory $script:testModuleSource | Wait-Job

0 commit comments

Comments
 (0)