From 612f1f7579820dc380d265d61924f7a7d8718859 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Fri, 24 Jul 2020 00:40:01 +0900 Subject: [PATCH] fix: chdir to workDir after copied assets Related to #324 --- src/git-utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/git-utils.ts b/src/git-utils.ts index 7f2e97eae..8b6816d50 100644 --- a/src/git-utils.ts +++ b/src/git-utils.ts @@ -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; } @@ -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}`); @@ -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; } }