Skip to content

Commit

Permalink
fix: chdir to workDir after copied assets
Browse files Browse the repository at this point in the history
Related to #324
  • Loading branch information
peaceiris committed Jul 23, 2020
1 parent af7aac1 commit 612f1f7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/git-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
await createBranchForce(inps.PublishBranch);
process.chdir(destDir);
await copyAssets(publishDir, destDir);
process.chdir(workDir);
return;
}

Expand Down Expand Up @@ -93,6 +94,7 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
}

await copyAssets(publishDir, destDir);
process.chdir(workDir);
return;
} else {
throw new Error(`Failed to clone remote branch ${inps.PublishBranch}`);
Expand All @@ -104,6 +106,7 @@ export async function setRepo(inps: Inputs, remoteURL: string, workDir: string):
process.chdir(workDir);
await createBranchForce(inps.PublishBranch);
await copyAssets(publishDir, destDir);
process.chdir(workDir);
return;
}
}
Expand Down

0 comments on commit 612f1f7

Please sign in to comment.