From 39e61945381e493e87f4006682081b89431a521a Mon Sep 17 00:00:00 2001 From: Definitely-Not-Vlad Date: Mon, 8 Mar 2021 13:45:51 +0100 Subject: [PATCH] Reset error to null on successful pull --- src/commands/clone.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/clone.js b/src/commands/clone.js index ed596a0..1e4dd7e 100644 --- a/src/commands/clone.js +++ b/src/commands/clone.js @@ -42,7 +42,7 @@ export async function pullExtensions(appId, destinationDir) { } async function pullExtension(destinationDir, { extension, canonicalName }) { - let pullError = {}; + let pullError = null; for (let i = 0; i < 4; i++) { try { const url = await getExtensionUrl(extension); @@ -53,6 +53,7 @@ async function pullExtension(destinationDir, { extension, canonicalName }) { path.join(destinationDir, canonicalName) ); + pullError = null; return; } catch (error) { if (error.code !== 'ENOTEMPTY') {