File tree Expand file tree Collapse file tree
BrowserStackLocal/BrowserStackLocal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ static bool IsAlpine()
5757 {
5858 try
5959 {
60- string [ ] output = Util . RunShellCommand ( "grep -w 'NAME' /etc/os-release" ) ;
60+ string [ ] output = Util . RunShellCommand ( "grep" , " -w \ ' NAME\ ' /etc/os-release") ;
6161 return output [ 0 ] ? . ToLower ( ) ? . Contains ( "alpine" ) ?? false ;
6262 }
6363 catch ( System . Exception ex )
Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ namespace BrowserStack
66 public class Util {
77
88 // Only Unix Support
9- public static string [ ] RunShellCommand ( string command )
9+ public static string [ ] RunShellCommand ( string command , string args = "" )
1010 {
11- ProcessStartInfo psi = new ProcessStartInfo ( "bash" , $ "-c \" { command } \" " ) {
11+ ProcessStartInfo psi = new ProcessStartInfo {
1212 RedirectStandardOutput = true ,
1313 RedirectStandardError = true ,
1414 UseShellExecute = false ,
15- CreateNoWindow = true
15+ CreateNoWindow = true ,
16+ FileName = command ,
17+ Arguments = args
1618 } ;
1719
1820 Process process = new Process { StartInfo = psi } ;
You can’t perform that action at this time.
0 commit comments