From 1f313c747c79d649519ac5ebeb49dd2abb532710 Mon Sep 17 00:00:00 2001 From: Ryuichi Okumura Date: Sat, 7 Dec 2019 00:22:30 +0900 Subject: [PATCH] Use path.resolve() instead --- bin/gh-pages.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bin/gh-pages.js b/bin/gh-pages.js index 1314dbd1..15f8ec61 100755 --- a/bin/gh-pages.js +++ b/bin/gh-pages.js @@ -8,10 +8,7 @@ const addr = require('email-addresses'); function publish(config) { return new Promise((resolve, reject) => { - let basePath = program.dist; - if (!program.dist.startsWith('/')) { - basePath = path.join(process.cwd(), program.dist); - } + const basePath = path.resolve(process.cwd(), program.dist); ghpages.publish(basePath, config, err => { if (err) { return reject(err);