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

CLI target option set to . will cause an error #10

Open
antfu opened this issue Aug 29, 2019 · 1 comment
Open

CLI target option set to . will cause an error #10

antfu opened this issue Aug 29, 2019 · 1 comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed Type: Bug Bug or Bug fixes

Comments

@antfu
Copy link
Member

antfu commented Aug 29, 2019

$ npx vue-i18n-locale-message squeeze --target=. --output=./translated.json
npx: installed 71 in 6.32s
Cannot read property 'split' of undefined

I suppose this is caused by this line:
https://github.com/kazupon/vue-i18n-locale-message/blob/7f2e0af4dea7710788bb8bd81b573cb60c8bbccd/src/utils.ts#L42

While path.parse('.') returns { ..., dir: '' } which causes target become undefined

PS. using Windows here

@kazupon
Copy link
Member

kazupon commented Aug 30, 2019

Thanks! feedback!

@kazupon kazupon added good first issue Good for newcomers Type: Bug Bug or Bug fixes help wanted Extra attention is needed windows labels Aug 30, 2019
@kazupon kazupon removed the windows label Dec 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed Type: Bug Bug or Bug fixes
Projects
None yet
Development

No branches or pull requests

2 participants