Skip to content

Commit

Permalink
更新系统 shell 操作类
Browse files Browse the repository at this point in the history
  • Loading branch information
iSafeBlue committed May 23, 2019
1 parent 8c801d1 commit 801ad38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/src/main/java/com/trackray/base/handle/Shell.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ public void exec(String... c) throws IOException {
String os = props.getProperty("os.name");
ArrayList<String> base = new ArrayList<>();
base.addAll(Arrays.asList((os.contains("indows") ? WIN_PREFIX : LINUX_PREFIX)));
base.add(target);
if (target!=null && !target.isEmpty())
base.add(target);
commands = base;
if (c!=null&&c.length>0)
base.addAll(Arrays.asList(c));
Expand Down

0 comments on commit 801ad38

Please sign in to comment.