-
Notifications
You must be signed in to change notification settings - Fork 403
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
Using -i with wildcard overwrites source JSON file #365
Comments
I've encountered the same bug. It seems to occur when the input directory contains a subdirectory and |
Hey there! What's it getting overwritten with? We should only be writing .d.ts files, not .json files. |
Please follow the above steps to reproduce the problem. You should find the source test/resources/multi-example/schemas/personForm.json is overwritten after running json2ts. |
@bingtimren I'd appreciate it if you could take a few mins to write out what exactly is getting overwritten with what, as part of this issue, so folks don't need to download zip files and debug themselves. |
Ok, the content of the example.zip is as follows:
Contents of the files before overwritten
Command that caused overwritten
After issuring the command, source "personForm.json" is overwritten
|
I see -- it seems like we're not setting the extension properly. Thanks for reporting! |
To reproduce this problem, download the attached file:
example.zip
Then execute the following commands
File "personForm.json" is overwritten. Source file should never be overwritten.
The text was updated successfully, but these errors were encountered: