Skip to content

Commit d4f611e

Browse files
committed
Simplify
1 parent 47d9401 commit d4f611e

File tree

1 file changed

+5
-13
lines changed
  • tests/periodic-test/time-is-synchronized

1 file changed

+5
-13
lines changed

tests/periodic-test/time-is-synchronized/index.ts

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ async function deleteTemplate(templateID: string) {
4949
"-y",
5050
templateID,
5151
]);
52+
53+
if (output.status.code !== 0) {
54+
throw new Error(`❌ Delete failed with code ${output.status.code}`);
55+
}
5256
}
5357

5458
const uniqueID = crypto.randomUUID();
@@ -124,17 +128,5 @@ try {
124128
});
125129
} finally {
126130
// delete template
127-
const output = await streamCommandOutput("deno", [
128-
"run",
129-
"--allow-all",
130-
"@e2b/cli",
131-
"template",
132-
"delete",
133-
"-y",
134-
templateID,
135-
]);
136-
137-
if (output.status.code !== 0) {
138-
throw new Error(`❌ Delete failed with code ${output.status.code}`);
139-
}
131+
await deleteTemplate(templateID);
140132
}

0 commit comments

Comments
 (0)