File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
mmc-dubbo-doe/src/main/java/com/mmc/dubbo/doe/client Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,9 @@ private String makeCommand(String pomXml) {
103103
104104 if (isOSLinux ()) {
105105 return StringUtil .format ("/bin/bash -c mvn dependency:copy-dependencies -DoutputDirectory={} -DincludeScope=compile -f {}" , libPath , pomXml );
106- } else {
106+ } else if (isOSMac ()){
107+ return StringUtil .format ("mvn dependency:copy-dependencies -DoutputDirectory={} -DincludeScope=compile -f {}" , libPath , pomXml );
108+ }else {
107109 return StringUtil .format ("cmd /c mvn dependency:copy-dependencies -DoutputDirectory=lib -DincludeScope=compile -f {}" , pomXml );
108110 }
109111 }
@@ -124,6 +126,23 @@ public static boolean isOSLinux() {
124126 }
125127 }
126128
129+ /**
130+ * judge if mac os.
131+ *
132+ * @return
133+ */
134+ public static boolean isOSMac () {
135+ Properties prop = System .getProperties ();
136+
137+ String os = prop .getProperty ("os.name" );
138+ if (os != null && os .toLowerCase ().contains ("mac" )) {
139+ return true ;
140+ } else {
141+ return false ;
142+ }
143+ }
144+
145+
127146 public boolean isDone () {
128147 return done ;
129148 }
You can’t perform that action at this time.
0 commit comments