Skip to content

Commit 2371c0a

Browse files
committed
fix: use path.join for generating java bin path
fix OpenAPITools#758
1 parent a5724ae commit 2371c0a

File tree

1 file changed

+4
-2
lines changed
  • apps/generator-cli/src/app/helpers

1 file changed

+4
-2
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import path from 'path';
2+
13
const isWin = () => process.platform === 'win32';
24

35
/**
@@ -6,6 +8,6 @@ const isWin = () => process.platform === 'win32';
68
*/
79
export const javaCmd: string = process.env['JAVA_HOME']
810
? isWin()
9-
? `"${process.env['JAVA_HOME']}/bin/java"`
10-
: `${process.env['JAVA_HOME']}/bin/java`
11+
? `"${path.join(process.env['JAVA_HOME'], 'bin', 'java')}"`
12+
: `${path.join(process.env['JAVA_HOME'], 'bin', 'java')}`
1113
: 'java';

0 commit comments

Comments
 (0)