-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Tidy up init
command impl, make it unpack into current folder
#3626
Conversation
improve docs append clue text after examples list throw error on already existing directory with example name better naming for temporary zip fallback to giter8 on g8 template passed adjust tests bring back tests for g8
CC @pawelsadlo |
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.
There should be at least a message/warning for every file we delete or overwrite.
@lefou with the current PR impl, we do not delete/overwrite any file, and fail early if there's any conflict between the zip example and the files already on disk |
There's something funky with |
I was referring to the deletion of a pre-existing
|
Unpacking into the current folder is much more useful due to the fact that we recommend people use a bootstrap script.
Since we now unpack into an existing folder that may or may not have things already in it, we add a new heuristic to fail early if the unpacking would over-write any existing files. This is a compromise, since we cannot easily assume the folder is 100% empty (what if there's a
.DS_STORE
in it???), nor can we remove any previous files we do not understand (what if there's already a.gitignore
or.git
?), and we also do not want to stomp over any existing files (what if there's already abuild.mill
and someone accidentally callsinit
?).Tweak the implementation to avoid using so many nested
Try
s, normal exception handling is enoughTested manually via
./mill installLocalCache