Skip to content

Commit ce0ee71

Browse files
author
Cédric Belin
committed
Update the launch script
1 parent b7a5415 commit ce0ee71

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

run.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env pwsh
22
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 }
3+
$commandPath = Get-Item $PSCommandPath
4+
$scriptRoot = $commandPath.LinkType ? (Split-Path $commandPath.LinkTarget) : $PSScriptRoot
5+
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

Comments
 (0)