Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow .cache directory to be configurable? #16

Closed
bebraw opened this issue Mar 8, 2015 · 4 comments
Closed

Allow .cache directory to be configurable? #16

bebraw opened this issue Mar 8, 2015 · 4 comments

Comments

@bebraw
Copy link

bebraw commented Mar 8, 2015

It looks like gh-pages figures out .cache dir like this:

function getCacheDir() {
  return path.relative(process.cwd(), path.resolve(__dirname, '../.cache'));
}

This can get rather nasty in case you are using gh-pages in a cli wrapper. What if we introduced cachePath option that, if set, would override this function? This would give me the flexibility I need.

@regular
Copy link

regular commented May 30, 2015

Isn't the clone option doing what you are looking for?

@bebraw
Copy link
Author

bebraw commented May 30, 2015

@regular That's actually close! I realized there's a little issue, though. copy(files, basePath, options.clone); will fail if clone directory is within basePath. You would need to do something more clever than that for this to work. As it is, it will yield just ENOENT, mkdir ''.

@regular
Copy link

regular commented May 30, 2015

@bebraw I got that too (also have the clone directory inside the basePath). I was able to resolve this by using relative paths rather than absolute paths. There seems to be a bug in utils.js that only surfaces when paths are absolute.

@bebraw
Copy link
Author

bebraw commented May 30, 2015

@regular Ah, I see. Thanks for the tip!

esarbanis added a commit to esarbanis/gh-pages that referenced this issue May 29, 2016
esarbanis added a commit to esarbanis/gh-pages that referenced this issue May 29, 2016
esarbanis added a commit to esarbanis/gh-pages that referenced this issue Feb 12, 2017
tschaub pushed a commit that referenced this issue May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants