File tree Expand file tree Collapse file tree 5 files changed +22
-350
lines changed 
lib/elixir/test/elixir/kernel Expand file tree Collapse file tree 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  =  @ ()
24
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+ }
521
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 6464test_parameters  = 
6565  if ( PathHelpers . windows? ( ) , 
6666    do:  [ % { cli_extension:  ".bat" } ] , 
67-     else: 
68-        [ % { cli_extension:  "" } ]  ++ 
69-         if ( System . find_executable ( "pwsh" ) ,  do:  [ % { cli_extension:  ".ps1" } ] ,  else:  [ ] ) 
67+     else:  [ % { cli_extension:  "" } ] 
7068  ) 
7169
7270defmodule  Kernel.CLI.ExecutableTest  do 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments