Commit 1b041703 authored by Bryan Clark's avatar Bryan Clark
Browse files

Move auth to the bottom of setup

parent 86e89385
Loading
Loading
Loading
Loading
+5 −2
Changes for src/setup-java.ts: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -15,13 +15,16 @@ async function run() {

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

    const matchersPath = path.join(__dirname, '..', '.github');
    console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);

    const username = core.getInput('username', {required: false});
    const password = core.getInput('password', {required: false});

    if (username && password) {
      await auth.configAuthentication(username, password);
    }

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