Skip to content

Commit e1d1c20

Browse files
committed
fix: increase wait time for artifact readiness and update success messages to use path.resolve for accurate file URIs
1 parent bc0eb00 commit e1d1c20

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

src/core/command-runner.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,8 +1284,7 @@ ${variableGroups.map((group: any) => ` - ${group.name}`).join('\n')}`);
12841284

12851285
if (shouldDownloadArtifacts && commitId && buildId) {
12861286
const artifactSpinner = createOra('Waiting for artifacts to be ready...').start();
1287-
// Wait for artifacts to be generated after build completion
1288-
await new Promise(resolve => setTimeout(resolve, 5000));
1287+
await new Promise(resolve => setTimeout(resolve, 10000));
12891288
artifactSpinner.text = 'Downloading artifacts...';
12901289
try {
12911290
const timestamp = Date.now();
@@ -1296,7 +1295,7 @@ ${variableGroups.map((group: any) => ` - ${group.name}`).join('\n')}`);
12961295
branchId: params.branchId,
12971296
profileId: params.profileId
12981297
}, downloadPath, artifactFileName);
1299-
artifactSpinner.succeed(`Artifacts downloaded successfully: file://${path.join(downloadPath, artifactFileName)}`);
1298+
artifactSpinner.succeed(`Artifacts downloaded successfully: file://${path.resolve(path.join(downloadPath, artifactFileName))}`);
13001299
} catch (e: any) {
13011300
artifactSpinner.fail(`Cannot download artifact since the build failed: ${e.message}`);
13021301
}
@@ -1354,7 +1353,7 @@ ${variableGroups.map((group: any) => ` - ${group.name}`).join('\n')}`);
13541353
branchId: params.branchId,
13551354
profileId: params.profileId
13561355
}, artifactDownloadPath, artifactFileName);
1357-
artifactSpinner.succeed(`Artifacts downloaded successfully: file://${path.join(artifactDownloadPath, artifactFileName)}`);
1356+
artifactSpinner.succeed(`Artifacts downloaded successfully: file://${path.resolve(path.join(artifactDownloadPath, artifactFileName))}`);
13581357
} catch (e: any) {
13591358
artifactSpinner.fail(`Cannot download artifact since the build failed: ${e.message}`);
13601359
}
@@ -1466,8 +1465,8 @@ ${variableGroups.map((group: any) => ` - ${group.name}`).join('\n')}`);
14661465

14671466
if (shouldDownloadArtifacts && commitId && buildId) {
14681467
const artifactSpinner = createOra('Waiting for artifacts to be ready...').start();
1469-
// Wait for artifacts to be generated after build completion
1470-
await new Promise(resolve => setTimeout(resolve, 5000));
1468+
// Wait for artifacts to be generated after build completion (increased to 10s)
1469+
await new Promise(resolve => setTimeout(resolve, 10000));
14711470
artifactSpinner.text = 'Downloading artifacts...';
14721471
try {
14731472
const timestamp = Date.now();
@@ -1478,7 +1477,7 @@ ${variableGroups.map((group: any) => ` - ${group.name}`).join('\n')}`);
14781477
branchId: params.branchId,
14791478
profileId: params.profileId
14801479
}, downloadPath, artifactFileName);
1481-
artifactSpinner.succeed(`Artifacts downloaded successfully: file://${path.join(downloadPath, artifactFileName)}`);
1480+
artifactSpinner.succeed(`Artifacts downloaded successfully: file://${path.resolve(path.join(downloadPath, artifactFileName))}`);
14821481
} catch (e: any) {
14831482
artifactSpinner.fail(`Cannot download artifact since the build failed: ${e.message}`);
14841483
}

0 commit comments

Comments
 (0)