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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

`Jekyll new` command should warn if overwriting existing files #981

Closed
benbalter opened this Issue Apr 16, 2013 · 9 comments

Comments

Projects
None yet
6 participants
@benbalter
Contributor

benbalter commented Apr 16, 2013

What I did:

  1. Make folder called test-site
  2. Add index.html or _config.yml file with "important content" to test-site folder
  3. Execute jekyll new test-site

What I expected:

  • A big red warning telling me I'm about to 馃挜 my files

What I saw:

  • Files were 馃拃
@parkr

This comment has been minimized.

Member

parkr commented Apr 16, 2013

Oof, yeah I guess that's smart. Like if one tries to git clone into a dir that isn't empty.

@parkr parkr closed this in ba64a9f Apr 16, 2013

parkr added a commit that referenced this issue Apr 22, 2013

Merge branch 'master' of github.com:mojombo/jekyll
* 'master' of github.com:mojombo/jekyll:
  Moving comparison for PostUrl tag to the PostComparer class
  Fail if destination directory for jekyll new exists and is not empty. Fixes #981.
  Remove code duplication: #write in Page and Post is the same.
@ericlathrop

This comment has been minimized.

ericlathrop commented May 14, 2013

You should be able to override this !empty check. For instance, when I create a new folder and do:

git init
rvm --rvmrc --create
gem install bundler
bundle install

I should still be able to jekyll new in there.

@parkr

This comment has been minimized.

Member

parkr commented May 14, 2013

Why not do this:

jekyll new new-site
cd new-site
git init
rvm --rvmrc --create
gem install bundler
bundle install

?

@ericlathrop

This comment has been minimized.

ericlathrop commented May 14, 2013

Because jekyll doesn't exist until bundle install.

@parkr

This comment has been minimized.

Member

parkr commented May 14, 2013

So how about a jekyll new <path> --force?

@ericlathrop

This comment has been minimized.

ericlathrop commented May 14, 2013

That would be nice.

@andersoonweb

This comment has been minimized.

andersoonweb commented Dec 18, 2015

@parkr thanks you! It was very helpful

@popmix

This comment has been minimized.

popmix commented Apr 28, 2016

Pls add something like "--force Force installation to existing directory. WARNING! existing jekyll files may be overwritten!" to Jekyll Usage Options section (when just typing "jekyll" in command prompt), otherwise there is no information about such flag.

@envygeeks

This comment has been minimized.

Contributor

envygeeks commented Apr 28, 2016

Please file a new ticket instead of requesting features inside of an already resolved ticket. Thanks!

@jekyll jekyll locked and limited conversation to collaborators Apr 28, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.