Skip to content

Commit a5724ae

Browse files
committed
fix: add quotation marks only for windows paths
1 parent ce2ac4c commit a5724ae

File tree

1 file changed

+5
-1
lines changed
  • apps/generator-cli/src/app/helpers

1 file changed

+5
-1
lines changed
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
const isWin = () => process.platform === 'win32';
2+
13
/**
24
* If JAVA_HOME is set, it returns `$JAVA_HOME/bin/java`
35
* otherwise it returns `java` and it has to be in the `PATH`
46
*/
57
export const javaCmd: string = process.env['JAVA_HOME']
6-
? `"${process.env['JAVA_HOME']}/bin/java"`
8+
? isWin()
9+
? `"${process.env['JAVA_HOME']}/bin/java"`
10+
: `${process.env['JAVA_HOME']}/bin/java`
711
: 'java';

0 commit comments

Comments
 (0)