File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -103204,13 +103204,13 @@ class JavaBase {
103204
103204
};
103205
103205
}
103206
103206
setJavaDefault(version, toolPath) {
103207
- const semVersion = semver_1.default.coerce(version) ;
103207
+ const majorVerssion = version.split('.')[0] ;
103208
103208
core.exportVariable('JAVA_HOME', toolPath);
103209
103209
core.addPath(path_1.default.join(toolPath, 'bin'));
103210
103210
core.setOutput('distribution', this.distribution);
103211
103211
core.setOutput('path', toolPath);
103212
103212
core.setOutput('version', version);
103213
- core.exportVariable(`JAVA_HOME_${semVersion.major.toString().toUpperCase() }`, toolPath);
103213
+ core.exportVariable(`JAVA_HOME_${majorVerssion }`, toolPath);
103214
103214
}
103215
103215
}
103216
103216
exports.JavaBase = JavaBase;
Original file line number Diff line number Diff line change @@ -142,12 +142,12 @@ export abstract class JavaBase {
142
142
}
143
143
144
144
protected setJavaDefault ( version : string , toolPath : string ) {
145
- const semVersion = semver . coerce ( version ) ;
145
+ const majorVerssion = version . split ( '.' ) [ 0 ] ;
146
146
core . exportVariable ( 'JAVA_HOME' , toolPath ) ;
147
147
core . addPath ( path . join ( toolPath , 'bin' ) ) ;
148
148
core . setOutput ( 'distribution' , this . distribution ) ;
149
149
core . setOutput ( 'path' , toolPath ) ;
150
150
core . setOutput ( 'version' , version ) ;
151
- core . exportVariable ( `JAVA_HOME_${ semVersion ! . major ! . toString ( ) . toUpperCase ( ) } ` , toolPath ) ;
151
+ core . exportVariable ( `JAVA_HOME_${ majorVerssion } ` , toolPath ) ;
152
152
}
153
153
}
You can’t perform that action at this time.
0 commit comments