pull/307/head
FongMi 2 years ago
parent 1914bbffc2
commit 89d110cc04
  1. 4
      catvod/src/main/java/com/github/catvod/utils/Shell.java

@ -1,11 +1,13 @@
package com.github.catvod.utils;
import com.orhanobut.logger.Logger;
public class Shell {
public static void exec(String command) {
try {
int code = Runtime.getRuntime().exec(command).waitFor();
if (code != 0) throw new RuntimeException("Shell command failed with exit code " + code);
if (code != 0) Logger.e("Shell command failed with exit code " + code);
} catch (Exception e) {
e.printStackTrace();
}

Loading…
Cancel
Save