File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
BrowserStackLocal/BrowserStackLocal Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ static bool IsAlpine()
57
57
{
58
58
try
59
59
{
60
- string [ ] output = Util . RunShellCommand ( "grep -w 'NAME' /etc/os-release" ) ;
60
+ string [ ] output = Util . RunShellCommand ( "grep" , " -w \ ' NAME\ ' /etc/os-release") ;
61
61
return output [ 0 ] ? . ToLower ( ) ? . Contains ( "alpine" ) ?? false ;
62
62
}
63
63
catch ( System . Exception ex )
Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ namespace BrowserStack
6
6
public class Util {
7
7
8
8
// Only Unix Support
9
- public static string [ ] RunShellCommand ( string command )
9
+ public static string [ ] RunShellCommand ( string command , string args = "" )
10
10
{
11
- ProcessStartInfo psi = new ProcessStartInfo ( "bash" , $ "-c \" { command } \" " ) {
11
+ ProcessStartInfo psi = new ProcessStartInfo {
12
12
RedirectStandardOutput = true ,
13
13
RedirectStandardError = true ,
14
14
UseShellExecute = false ,
15
- CreateNoWindow = true
15
+ CreateNoWindow = true ,
16
+ FileName = command ,
17
+ Arguments = args
16
18
} ;
17
19
18
20
Process process = new Process { StartInfo = psi } ;
You can’t perform that action at this time.
0 commit comments