-
Notifications
You must be signed in to change notification settings - Fork 53
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
Make 'yo generate' overwrite yo_db file #61
Make 'yo generate' overwrite yo_db file #61
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
fc932e1
to
37de091
Compare
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
@kazegusuri just ping |
fi, err := os.Stat(filename) | ||
if err == nil && fi.IsDir() { | ||
return nil, errors.New("filename cannot be directory") | ||
} | ||
|
||
// skip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm... I'm not sure why this skips... The mystery is derived from xo.
yo generate
does not overwriteYOTemplate
(yo_db
) file if the file already exists. This PR makes it overwriteYOTemplate
file. I'm not sure why it currently skips writingYOTemplate
file, but this change certainly makes it easier to updateyo_db.tpl
of a project.Note that it always overwrites
YOTemplate
content if the single file option is enabled, becauseGenerator.files
already has the file pointer when it tries to get the file pointer to write the content.