Skip to content

Commit

Permalink
able to run docker on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
teras committed Jun 18, 2020
1 parent 8db5c76 commit 3dd9558
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmmanager
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.attribute.PosixFilePermissions;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.*;

import static org.crossmobile.utils.SystemDependent.Execs.BASH;
import static org.crossmobile.utils.SystemDependent.Execs.JAVA;
import static org.crossmobile.utils.TextUtils.iterableToString;

public class SystemDependent {

Expand Down Expand Up @@ -305,6 +304,15 @@ public static String getFullName() {
return "Company";
}

public static Map<String, String> getEnvWithFixedPaths() {
Map<String, String> env = new HashMap<>(System.getenv());
Collection<String> paths = new LinkedHashSet<>(Arrays.asList(env.getOrDefault("PATH", "").split(File.pathSeparator)));
paths.add("/usr/local/bin");
paths.add("/usr/local/sbin");
env.put("PATH", iterableToString(paths, File.pathSeparator));
return env;
}

public enum Execs {

JAVA("exe"),
Expand Down

0 comments on commit 3dd9558

Please sign in to comment.