public static boolean isCygwinOrMinGW() {
        if (isWindows()) {
            if ((System.getenv("MSYSTEM") != null && System.getenv("MSYSTEM").startsWith("MINGW"))
                    || "/bin/bash".equals(System.getenv("SHELL"))) {
                return true;
            }
        }
        return false;
    }
referer https://github.com/alibaba/arthas/blob/master/common/src/main/java/com/taobao/arthas/common/OSUtils.java
cop/src/main/java/code/landgrey/copagent/utils/OSUtils.java