fix: chdir to workDir after copied assets

Related to #324
This commit is contained in:
peaceiris 2020-07-24 00:40:01 +09:00
parent af7aac1007
commit 612f1f7579
No known key found for this signature in database
GPG Key ID: 5868468A8EBA64EC
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}
}