Skip to content

Commit f8ce0a2

Browse files
committed
refactor(devnet): Run dependencies task sequentially and set task runner to exit on error.
* Dependencies task download and extract artifacts information. The change prevents race-condition errors that cause EEXIST and ENOENT errors. * Set task runner to exit on error. That change is targeting the release CI action to avoid publishing a package with missing data.
1 parent e1fd803 commit f8ce0a2

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.changeset/sweet-items-film.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cartesi/devnet": patch
3+
---
4+
5+
Download artifacts dependencies sequentially to avoid race-condition errors when creating directories and files, which can result in EEXIST followed by ENOENT errors. Also, explicitly configure the task runner to exit on error, so it doesn't publish a package with missing required information.

packages/devnet/build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ const build = async () => {
189189
{
190190
title: "Download dependencies",
191191
task: async (_, task) =>
192-
task.newListr(dependencies, { concurrent: true }),
192+
task.newListr(dependencies, { concurrent: false }),
193193
},
194194
{
195195
title: "Starting anvil...",
@@ -261,7 +261,7 @@ const build = async () => {
261261
},
262262
},
263263
],
264-
{ exitOnError: false },
264+
{ exitOnError: true },
265265
);
266266

267267
await tasks.run({

0 commit comments

Comments
 (0)