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

Only relative handlebars setup path is supported #180

Closed
radekwlsk opened this issue Sep 10, 2020 · 2 comments
Closed

Only relative handlebars setup path is supported #180

radekwlsk opened this issue Sep 10, 2020 · 2 comments

Comments

@radekwlsk
Copy link

radekwlsk commented Sep 10, 2020

As setup is loaded with
https://github.com/CookPete/auto-changelog/blob/4ac883029e01f57d1b57605614b36836e42ce3ca/src/template.js#L82

it is impossible to provide absolute path to the file and it has to be located in pwd.

Would it be possible to allow absolute paths for --handlebars-setup (and possibly all other options that take path)?

@cookpete
Copy link
Owner

Would changing to just const setup = require(handlebarsSetup) break existing implementations?

@radekwlsk
Copy link
Author

You could check if provided path starts with / or not. If someone put relative path as /path/to/file/in/cwd and it works then for me that is a bug.

If it was up to me, that should work in the following way: path starts with / – do nothing, else join with cwd.

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