From f06738911c67eaa55f3f5daaa9f8ed840ccd4506 Mon Sep 17 00:00:00 2001 From: peaceiris <30958501+peaceiris@users.noreply.github.com> Date: Tue, 20 Oct 2020 17:17:38 +0900 Subject: [PATCH] fix: Use path.resolve for inps.PublishDir not path.join --- src/git-utils.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/git-utils.ts b/src/git-utils.ts index f9f3331..a0fc759 100644 --- a/src/git-utils.ts +++ b/src/git-utils.ts @@ -43,7 +43,7 @@ export async function copyAssets( const dotGitPath = path.join(publishDir, '.git'); if (fs.existsSync(dotGitPath)) { - core.info(`[INFO] delete .git`); + core.info(`[INFO] delete ${dotGitPath}`); io.rmRF(dotGitPath); } @@ -57,8 +57,8 @@ export async function copyAssets( export async function setRepo(inps: Inputs, remoteURL: string, workDir: string): Promise { const publishDir = path.isAbsolute(inps.PublishDir) - ? inps.PublishDir - : path.join(`${process.env.GITHUB_WORKSPACE}`, inps.PublishDir); + ? path.resolve(inps.PublishDir) + : path.resolve(`${process.env.GITHUB_WORKSPACE}`, inps.PublishDir); if (path.isAbsolute(inps.DestinationDir)) { throw new Error('destination_dir should be a relative path');