Commit b080215 1 parent d99cf93 commit b080215 Copy full SHA for b080215
File tree 1 file changed +7
-3
lines changed
utils/src/main/java/com/cloud/utils/script
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) {
660
660
return executable ;
661
661
}
662
662
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 );
665
665
if (command .length > 1 ) {
666
666
for (int i = 1 ; i < command .length ; ++i ) {
667
667
s .add (command [i ]);
@@ -670,12 +670,16 @@ private static Script getScriptForCommandRun(String... command) {
670
670
return s ;
671
671
}
672
672
673
+ private static Script getScriptForCommandRun (String ... command ) {
674
+ return getScriptForCommandRun (0 , command );
675
+ }
676
+
673
677
public static String executeCommand (String ... command ) {
674
678
return runScript (getScriptForCommandRun (command ));
675
679
}
676
680
677
681
public static int executeCommandForExitValue (long timeout , String ... command ) {
678
- return runScriptForExitValue (getScriptForCommandRun (command ));
682
+ return runScriptForExitValue (getScriptForCommandRun (timeout , command ));
679
683
}
680
684
681
685
public static int executeCommandForExitValue (String ... command ) {
You can’t perform that action at this time.
0 commit comments