Skip to content

Commit 4c400e9

Browse files
committed
Better detection of cygwin
1 parent 3068b3a commit 4c400e9

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/license/THIRD-PARTY.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Please fill the missing licenses for dependencies :
1414
#
1515
#
16-
#Tue Nov 21 23:24:03 CET 2017
16+
#Fri Nov 24 11:35:19 CET 2017
1717
classworlds--classworlds--1.1-alpha-2=
1818
commons-collections--commons-collections--3.1=
1919
dom4j--dom4j--1.6.1=

src/main/java/org/seedstack/maven/GenerateMojo.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,10 +431,12 @@ private Inquirer getInquirer() {
431431
}
432432

433433
private boolean autodetectBasicMode() {
434-
String ostype = System.getenv("OSTYPE");
435-
if (ostype != null && !ostype.isEmpty()) {
436-
// Fancy mode never works under cygwin
437-
if (ostype.startsWith("cygwin")) {
434+
String osType = System.getenv("OSTYPE");
435+
String cygwin = System.getenv("CYGWIN");
436+
if (cygwin != null) {
437+
return true;
438+
} else if (osType != null && !osType.isEmpty()) {
439+
if (osType.startsWith("cygwin")) {
438440
return true;
439441
}
440442
}

0 commit comments

Comments
 (0)