Skip to content

Commit

Permalink
Reset error to null on successful pull
Browse files Browse the repository at this point in the history
  • Loading branch information
Definitely-Not-Vlad committed Mar 8, 2021
1 parent 0133e6f commit 39e6194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/commands/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -53,6 +53,7 @@ async function pullExtension(destinationDir, { extension, canonicalName }) {
path.join(destinationDir, canonicalName)
);

pullError = null;
return;
} catch (error) {
if (error.code !== 'ENOTEMPTY') {
Expand Down

0 comments on commit 39e6194

Please sign in to comment.