@@ -55,14 +55,9 @@ The following options are generally used under releases.
55
55
--boot "FILE" Uses the given FILE.boot to start the system
56
56
--boot-var VAR "VALUE" Makes `$ VAR available as VALUE to FILE.boot (*)
57
57
--erl-config "FILE" Loads configuration in FILE.config written in Erlang (*)
58
- --pipe-to "PIPEDIR" "LOGDIR" Starts the Erlang VM as a named PIPEDIR and LOGDIR
59
58
--vm-args "FILE" Passes the contents in file as arguments to the VM
60
59
61
- --pipe-to starts Elixir detached from console (Unix-like only).
62
- It will attempt to create PIPEDIR and LOGDIR if they don't exist.
63
- See run_erl to learn more. To reattach, run: to_erl PIPEDIR.
64
-
65
- --pipe-to is not supported on Windows. If set, Elixir won't boot.
60
+ --pipe-to is not supported via PowerShell.
66
61
67
62
** Options marked with (*) can be given more than once.
68
63
** Standalone options can't be combined with other options.
@@ -260,28 +255,6 @@ for ($i = 0; $i -lt $allArgs.Count; $i++) {
260
255
break
261
256
}
262
257
263
- " --pipe-to" {
264
- $runErlPipe = $allArgs [++ $i ]
265
- $runErlLog = $allArgs [++ $i ]
266
-
267
- if ($null -eq $runErlPipe ) {
268
- Write-Error " --pipe-to: PIPEDIR must be present"
269
- exit 1
270
- }
271
-
272
- if ($null -eq $runErlLog ) {
273
- Write-Error " --pipe-to: PIPELOG must be present"
274
- exit 1
275
- }
276
-
277
- if ($runErlPipe.EndsWith (" /" ) -or $runErlLog.EndsWith (" /" )) {
278
- Write-Error " --pipe-to: PIPEDIR and PIPELOG must not end with a slash"
279
- exit 1
280
- }
281
-
282
- break
283
- }
284
-
285
258
Default {
286
259
$private :normalized = NormalizeArg $arg
287
260
$allOtherParams += $normalized
@@ -297,12 +270,6 @@ if ($null -eq $useIEx) {
297
270
$beforeExtras = @ (" -pa" , " $ ( Join-Path $scriptPath - ChildPath " ../lib/elixir/ebin" ) " ) + $beforeExtras
298
271
$beforeExtras = @ (" -noshell" , " -elixir_root" , " $ ( Join-Path $scriptPath - ChildPath " ../lib" ) " ) + $beforeExtras
299
272
300
- # One MAY change ERTS_BIN= but you MUST NOT change
301
- # ERTS_BIN=$ERTS_BIN as it is handled by Elixir releases.
302
- # TODO: change when we port the releases scripts.
303
- # $ERTS_BIN=
304
- $ERTS_BIN = " $env: ERTS_BIN "
305
-
306
273
$allParams = @ ()
307
274
308
275
if ($null -ne $env: ELIXIR_ERL_OPTIONS ) {
@@ -325,40 +292,13 @@ if ($isWindows -or ($null -eq $isWindows)) {
325
292
326
293
$binPath = " $erlExec$binSuffix "
327
294
328
- if ($ERTS_BIN ) {
329
- $binPath = Join-Path - Path $ERTS_BIN - ChildPath $binPath
330
- }
331
-
332
- if ($null -eq $runErlPipe ) {
333
- # We double the double-quotes because they are going to be escaped by arguments parsing.
334
- $paramsPart = $allParams | ForEach-Object - Process { QuoteString($_ -replace " `" " , " `"`" " ) }
335
- }
336
- else {
337
- $allParams.Insert (0 , $binPath )
338
-
339
- $erlExec = " run_erl"
340
- $binPath = " $erlExec$binSuffix "
341
-
342
- if ($ERTS_BIN ) {
343
- $binPath = Join-Path - Path $ERTS_BIN - ChildPath $binPath
344
- }
345
-
346
- # We scape special chars using the Unix style of scaping, with "\".
347
- # But first we escape the double-quotes, because for some reason they are not escaped in the same regex.
348
- $private :escaped = $allParams | ForEach-Object - Process { ($_ -replace " `" " , " \`" " ) -replace " [^a-zA-Z0-9_/-]" , " \$&" }
349
-
350
- # The args are surrounded here because we want to have only one argument for the entire command.
351
- $paramsPart = @ (" -daemon" , " `" $runErlPipe /`" " , " `" $runErlLog /`" " , " `" $ ( $escaped -join " " ) `" " )
352
- }
295
+ # We double the double-quotes because they are going to be escaped by arguments parsing.
296
+ $paramsPart = $allParams | ForEach-Object - Process { QuoteString($_ -replace " `" " , " `"`" " ) }
353
297
354
298
if ($env: ELIXIR_CLI_DRY_RUN ) {
355
299
Write-Host " $binPath $paramsPart "
356
300
}
357
301
else {
358
- if ($runErlPipe ) {
359
- $null = New-Item - Path " ." - ItemType " directory" - Name " $runErlPipe " - Force
360
- $null = New-Item - Path " ." - ItemType " directory" - Name " $runErlLog " - Force
361
- }
362
302
$output = Start-Process - FilePath $binPath - ArgumentList $paramsPart - NoNewWindow - Wait - PassThru
363
303
exit $output.ExitCode
364
304
}
0 commit comments