Unverified Commit bdc7162f authored by Alexis Tual's avatar Alexis Tual
Browse files

Forward the setup short-lived token Promise

This caused a race condition not allowing the short-lived token to be returned in time before the setup finished.
parent 31ae3562
Loading
Loading
Loading
Loading
+1 −1
Changes for sources/src/develocity/build-scan.ts: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ export async function setup(config: BuildScanConfig): Promise<void> {
    maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_USERNAME', config.getGradlePluginRepositoryUsername())
    maybeExportVariableNotEmpty('GRADLE_PLUGIN_REPOSITORY_PASSWORD', config.getGradlePluginRepositoryPassword())

    setupToken(config.getDevelocityAccessKey(), config.getDevelocityTokenExpiry())
    return setupToken(config.getDevelocityAccessKey(), config.getDevelocityTokenExpiry())
}

function maybeExportVariable(variableName: string, value: unknown): void {