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 @@ -660,8 +660,8 @@ public static String getExecutableAbsolutePath(String executable) {
660660 return executable ;
661661 }
662662
663- private static Script getScriptForCommandRun (String ... command ) {
664- Script s = new Script (command [0 ], 0 );
663+ private static Script getScriptForCommandRun (long timeout , String ... command ) {
664+ Script s = new Script (command [0 ], timeout );
665665 if (command .length > 1 ) {
666666 for (int i = 1 ; i < command .length ; ++i ) {
667667 s .add (command [i ]);
@@ -670,12 +670,16 @@ private static Script getScriptForCommandRun(String... command) {
670670 return s ;
671671 }
672672
673+ private static Script getScriptForCommandRun (String ... command ) {
674+ return getScriptForCommandRun (0 , command );
675+ }
676+
673677 public static String executeCommand (String ... command ) {
674678 return runScript (getScriptForCommandRun (command ));
675679 }
676680
677681 public static int executeCommandForExitValue (long timeout , String ... command ) {
678- return runScriptForExitValue (getScriptForCommandRun (command ));
682+ return runScriptForExitValue (getScriptForCommandRun (timeout , command ));
679683 }
680684
681685 public static int executeCommandForExitValue (String ... command ) {
You can’t perform that action at this time.
0 commit comments