File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
utils/src/main/java/com/cloud/utils/script Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -661,8 +661,8 @@ public static String getExecutableAbsolutePath(String executable) {
661661 return executable ;
662662 }
663663
664- private static Script getScriptForCommandRun (String ... command ) {
665- Script s = new Script (command [0 ], 0 );
664+ private static Script getScriptForCommandRun (long timeout , String ... command ) {
665+ Script s = new Script (command [0 ], timeout );
666666 if (command .length > 1 ) {
667667 for (int i = 1 ; i < command .length ; ++i ) {
668668 s .add (command [i ]);
@@ -671,12 +671,16 @@ private static Script getScriptForCommandRun(String... command) {
671671 return s ;
672672 }
673673
674+ private static Script getScriptForCommandRun (String ... command ) {
675+ return getScriptForCommandRun (0 , command );
676+ }
677+
674678 public static String executeCommand (String ... command ) {
675679 return runScript (getScriptForCommandRun (command ));
676680 }
677681
678682 public static int executeCommandForExitValue (long timeout , String ... command ) {
679- return runScriptForExitValue (getScriptForCommandRun (command ));
683+ return runScriptForExitValue (getScriptForCommandRun (timeout , command ));
680684 }
681685
682686 public static int executeCommandForExitValue (String ... command ) {
You can’t perform that action at this time.
0 commit comments