Skip to content

Commit 6a774b7

Browse files
committed
♻️ Move bootstrap script to separate variable
1 parent 19dc447 commit 6a774b7

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

ModuleFast.ps1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,12 @@ if ($UseMain) {
100100

101101
if ($installArgs) {
102102
try {
103-
Write-Debug "Detected we were started with args, running $Entrypoint $($installArgs -join ' ')"
103+
[string]$bootstrapScript = "$EntryPoint $($installArgs -join ' ')"
104+
Write-Debug "Detected we were started with args, running $bootstrapScript"
104105
#TODO: Find a less gross way to do this than Invoke-Expression
105-
Invoke-Expression "$EntryPoint $($installArgs -join ' ')"
106+
Invoke-Expression $bootstrapScript
106107
} finally {
107108
#Remove the bootstrap module if args were specified, otherwise persist it in memory
108109
Remove-Module $bootstrapModule
109110
}
110-
111111
}
112-
113-

0 commit comments

Comments
 (0)