bitwalker / bitwalker/distillery

[windows] Script fix for <app> foreground

Open
#610 1 comment 0 reactions 0 assignees View on GitHub
os:windows
Dominant language
Elixir
Stars
3k
Forks
398
PR merge metrics
No merged PRs in 30d

Description

Previously on an ` foreground`, the task information would show but no input and no shell would show either meaning that the redirected output was invisble.

By changing the script to resemble the following, the node is started and can be interacted with

```powershell
## This command starts the release in the foreground, i.e.
## standard out is routed to the current terminal session.

require-cookie

# Start the VM, executing pre and post start hooks
run-hooks -Phase pre_start

$boot = (join-path $Env:REL_DIR $Env:REL_NAME)

# Build argument vector for erl
$erl_opts = @()
if ($Env:ERL_OPTS -ne $null) {
$erl_opts = string-to-argv -String $Env:ERL_OPTS
}
$extra_opts = @()
if ($Env:EXTRA_OPTS -ne $null) {
$extra_opts = string-to-argv -String $Env:EXTRA_OPTS
}

#$argv = @("-noshell", "-noinput", "+Bd")
$argv += @("-boot", $boot)
$argv += @("-args_file", "$Env:VMARGS_PATH")
$argv += @("-mode", "embedded")
$argv += $erl_opts
$argv += "-extra"
$argv += $extra_opts
$argv += $args

run-hooks -Phase post_start

iex "erl $argv"

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.