File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ function Invoke-ScriptInBcContainer {
30
30
[bool ] $usePwsh = $bccontainerHelperConfig.usePwshForBc24
31
31
)
32
32
33
+ $file = ' '
33
34
if (! $useSession ) {
34
35
$file = Join-Path $bcContainerHelperConfig.hostHelperFolder ([GUID ]::NewGuid().Tostring()+ ' .ps1' )
35
- $containerFile = $containerFile = Get-BcContainerPath - containerName $containerName - path $file
36
+ $containerFile = Get-BcContainerPath - containerName $containerName - path $file
36
37
if ($isInsideContainer -or " $containerFile " -eq " " ) {
37
38
$useSession = $true
38
39
}
@@ -111,6 +112,10 @@ function Invoke-ScriptInBcContainer {
111
112
throw $errorMessage
112
113
}
113
114
} else {
115
+ if ($file -eq ' ' ) {
116
+ $file = Join-Path $bcContainerHelperConfig.hostHelperFolder ([GUID ]::NewGuid().Tostring()+ ' .ps1' )
117
+ $containerFile = Get-BcContainerPath - containerName $containerName - path $file
118
+ }
114
119
if (" $containerFile " -eq " " ) {
115
120
throw " $ ( $bcContainerHelperConfig.hostHelperFolder ) is not shared with the container, cannot invoke scripts in container without using a session"
116
121
}
You can’t perform that action at this time.
0 commit comments