Skip to content

Commit 1b04170

Browse files
author
Bryan Clark
committed
Move auth to the bottom of setup
1 parent 86e8938 commit 1b04170

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/setup-java.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,16 @@ async function run() {
1515

1616
await installer.getJava(version, arch, jdkFile, javaPackage);
1717

18+
const matchersPath = path.join(__dirname, '..', '.github');
19+
console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
20+
1821
const username = core.getInput('username', {required: false});
1922
const password = core.getInput('password', {required: false});
2023

21-
await auth.configAuthentication(username, password);
24+
if (username && password) {
25+
await auth.configAuthentication(username, password);
26+
}
2227

23-
const matchersPath = path.join(__dirname, '..', '.github');
24-
console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
2528
} catch (error) {
2629
core.setFailed(error.message);
2730
}

0 commit comments

Comments
 (0)