-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[windows] <app> console starts incorrectly #608
Comments
After modifying the ## Run the app in console mode
$bin = whereis-erts-bin
$erl = (join-path $bin "erl.exe")
$boot = (join-path $Env:REL_DIR "$Env:REL_NAME")
$argv = @("-boot", $boot)
$argv += @("-config", $Env:SYS_CONFIG_PATH)
$argv += @("-args_file", $Env:VMARGS_PATH)
$argv += @("-user", "Elixir.IEx.CLI")
$argv += @("-extra", "--no-halt", "+iex")
run-hooks -Phase pre_start
$post_start = {
start-sleep -Second 2
run-hooks -Phase post_start
}
# Run post-start hooks asynchronously
start-job -Name "post_start hooks" -ScriptBlock $post_start
Write-Host ""
Write-Host "Command: $erl $argv"
Write-Host ""
iex "$erl $argv" I instead get the following error:
|
What version of Powershell is this on? |
|
using the master branch results in the erl window appearing and staying open until closed, however I still believe this to be unexpected behaviour as I would expect |
@artman41 The powershell scripts in Distillery are targeting PS core (which on my machine is v6.0.4, but I haven't updated recently). The reason for this is because it allows me to test the scripts on a non-Windows machine, as I do not have a dedicated Windows box. If you are encountering bugs in older versions of Powershell, it may work better on PS core. In general I'd like to make sure the scripts are kept compatible with PS core first, older versions second.
The reason we use |
If that is the case then I would appreciate a flag to decide between the two on release, mainly due to the fact that it is out of my control the version of powershell my users will have and I personally am using the default powershell packaged with Windows 10 usage wise however, it makes more sense to be able to execute the batch and have the output run inside the current shell window, mirroring how it would on unix, however I can understand your hesitation if it's true that |
I can confirm that using the master branch results in werl not closing immediately. |
@bitwalker can we have an update on this please? |
@artman41 I'm unable to perform this work any time soon unfortunately, my win32 dev environment is not available, and both making the powershell scripts work with arbitrarily old versions of powershell, and supporting the use of If you or others in the community are able to assist via PRs, then I'll gladly merge such work, but unfortunately that's the best I can do for now. I'm going to close this issue since the OP is addressed, but feel free to open new issues for the other things raised here. |
Version info
Steps to reproduce
Run
<app> console
Description of issue
When running
<app> console
I expect a local node to be started and the current console window to attach to that session. As it stands, an erlang window will appear momentarily before closing with the following appearing in the consoleThe text was updated successfully, but these errors were encountered: