Files
story-studio/remotion/node_modules/.bin/remotiond.ps1
2026-02-21 10:33:18 +01:00

29 lines
1.1 KiB
PowerShell

#!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
# Fix case when both the Windows and Linux builds of Node
# are installed in the same directory
$exe=".exe"
}
$ret=0
if (Test-Path "$basedir/deno$exe") {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "$basedir/deno$exe" --allow-env --allow-read --allow-write --allow-net --allow-run --allow-sys "$basedir/../@remotion/cli/remotiond-cli.js" $args
} else {
& "$basedir/deno$exe" --allow-env --allow-read --allow-write --allow-net --allow-run --allow-sys "$basedir/../@remotion/cli/remotiond-cli.js" $args
}
$ret=$LASTEXITCODE
} else {
# Support pipeline input
if ($MyInvocation.ExpectingInput) {
$input | & "deno$exe" --allow-env --allow-read --allow-write --allow-net --allow-run --allow-sys "$basedir/../@remotion/cli/remotiond-cli.js" $args
} else {
& "deno$exe" --allow-env --allow-read --allow-write --allow-net --allow-run --allow-sys "$basedir/../@remotion/cli/remotiond-cli.js" $args
}
$ret=$LASTEXITCODE
}
exit $ret