mirror of
https://github.com/actions/setup-java.git
synced 2026-07-22 14:52:56 +00:00
Add an option to disable Java problem matchers (#1133)
* Add problem matcher opt-out Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 38eb7886-7ea3-4e4d-8d5f-e3f975135053 * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -8,6 +8,7 @@ export const INPUT_JDK_FILE = 'jdk-file';
|
||||
export const INPUT_JDK_FILE_DEPRECATED = 'jdkFile';
|
||||
export const INPUT_CHECK_LATEST = 'check-latest';
|
||||
export const INPUT_SET_DEFAULT = 'set-default';
|
||||
export const INPUT_PROBLEM_MATCHER = 'problem-matcher';
|
||||
export const INPUT_VERIFY_SIGNATURE = 'verify-signature';
|
||||
export const INPUT_VERIFY_SIGNATURE_PUBLIC_KEY = 'verify-signature-public-key';
|
||||
export const INPUT_SERVER_ID = 'server-id';
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import * as core from '@actions/core';
|
||||
import {INPUT_PROBLEM_MATCHER} from './constants.js';
|
||||
import {getBooleanInput} from './util.js';
|
||||
|
||||
export function configureProblemMatcher(matcherPath: string): void {
|
||||
const problemMatcherEnabled = getBooleanInput(INPUT_PROBLEM_MATCHER, true);
|
||||
|
||||
if (!problemMatcherEnabled) {
|
||||
core.debug('Java problem matcher is disabled');
|
||||
return;
|
||||
}
|
||||
|
||||
core.info(`##[add-matcher]${matcherPath}`);
|
||||
}
|
||||
+2
-1
@@ -14,6 +14,7 @@ import {fileURLToPath} from 'url';
|
||||
import {getJavaDistribution} from './distributions/distribution-factory.js';
|
||||
import {JavaInstallerOptions} from './distributions/base-models.js';
|
||||
import {configureMavenArgs} from './maven-args.js';
|
||||
import {configureProblemMatcher} from './problem-matcher.js';
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
@@ -120,7 +121,7 @@ async function run() {
|
||||
'..',
|
||||
'.github'
|
||||
);
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
|
||||
configureProblemMatcher(path.join(matchersPath, 'java.json'));
|
||||
|
||||
await auth.configureAuthentication();
|
||||
configureMavenArgs();
|
||||
|
||||
Reference in New Issue
Block a user