Skip to content

Commit

Permalink
Allow an absolute path as dist directory
Browse files Browse the repository at this point in the history
Fixes: #317
  • Loading branch information
okuryu committed Oct 4, 2019
1 parent 0249ac9 commit 1f0e59f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/gh-pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const addr = require('email-addresses');

function publish(config) {
return new Promise((resolve, reject) => {
const basePath = path.join(process.cwd(), program.dist);
let basePath = program.dist;
if (!program.dist.startsWith('/')) {
basePath = path.join(process.cwd(), program.dist);
}
ghpages.publish(basePath, config, err => {
if (err) {
return reject(err);
Expand Down

0 comments on commit 1f0e59f

Please sign in to comment.