File tree 5 files changed +22
-350
lines changed
lib/elixir/test/elixir/kernel
5 files changed +22
-350
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- # !/usr/bin/env pwsh
1
+ # Store path to mix.bat as a FileInfo object
2
+ $mixBatPath = (Get-ChildItem (((Get-ChildItem $MyInvocation.MyCommand.Path ).Directory.FullName) + ' \mix.bat' ))
3
+ $newArgs = @ ()
2
4
3
- $scriptPath = Split-Path - Parent $PSCommandPath
4
- $elixirMainScript = Join-Path - Path $scriptPath - ChildPath " elixir.ps1"
5
+ for ($i = 0 ; $i -lt $args.length ; $i ++ )
6
+ {
7
+ if ($args [$i ] -is [array ])
8
+ {
9
+ # Commas created the array so we need to reintroduce those commas
10
+ for ($j = 0 ; $j -lt $args [$i ].length - 1 ; $j ++ )
11
+ {
12
+ $newArgs += ($args [$i ][$j ] + ' ,' )
13
+ }
14
+ $newArgs += $args [$i ][-1 ]
15
+ }
16
+ else
17
+ {
18
+ $newArgs += $args [$i ]
19
+ }
20
+ }
5
21
6
- $mixFile = Join-Path - Path $scriptPath - ChildPath " mix"
7
-
8
- $prependedArgs = @ ($mixFile )
9
-
10
- $allArgs = $prependedArgs + $args
11
-
12
- # The dot is going to evaluate the script with the vars defined here.
13
- . $elixirMainScript
22
+ # Corrected arguments are ready to pass to batch file
23
+ & $mixBatPath $newArgs
Original file line number Diff line number Diff line change 64
64
test_parameters =
65
65
if ( PathHelpers . windows? ( ) ,
66
66
do: [ % { cli_extension: ".bat" } ] ,
67
- else:
68
- [ % { cli_extension: "" } ] ++
69
- if ( System . find_executable ( "pwsh" ) , do: [ % { cli_extension: ".ps1" } ] , else: [ ] )
67
+ else: [ % { cli_extension: "" } ]
70
68
)
71
69
72
70
defmodule Kernel.CLI.ExecutableTest do
You can’t perform that action at this time.
0 commit comments