We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7a5415 commit ce0ee71Copy full SHA for ce0ee71
run.ps1
@@ -1,5 +1,8 @@
1
#!/usr/bin/env pwsh
2
Set-StrictMode -Version Latest
3
-$file = "$PSScriptRoot/lib/cli.js"
4
-if (Test-Path "$file.map") { & node --enable-source-maps $file @args }
5
-else { & node $file @args }
+$commandPath = Get-Item $PSCommandPath
+$scriptRoot = $commandPath.LinkType ? (Split-Path $commandPath.LinkTarget) : $PSScriptRoot
+
6
+$entryPoint = "$scriptRoot/lib/cli.js"
7
+if (Test-Path "$entryPoint.map") { & node --enable-source-maps $entryPoint @args }
8
+else { & node $entryPoint @args }
0 commit comments