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

Suggest an overwriting warning. #4023

Closed
superfashi opened this issue Oct 12, 2015 · 13 comments
Closed

Suggest an overwriting warning. #4023

superfashi opened this issue Oct 12, 2015 · 13 comments

Comments

@superfashi
Copy link

I was building a page with jekyll on my server, but I just accidentally typed in a wrong directory and it just overwrited anything in that dir. All my things just gone in a second, and it is hard to recover them. I know it's my fault to use root permission but I really want an overwrite warning for writing into a non-empty directory.
A lot thanks.

@superfashi superfashi changed the title Suggeting an overwrite warning. Suggest an overwriting warning. Oct 12, 2015
@parkr
Copy link
Member

parkr commented Oct 12, 2015

Oh man, I'm sorry to hear that! It always sucks to love your files.

What command did you use?

@parkr parkr added the ux label Oct 12, 2015
@superfashi
Copy link
Author

jekyll build -d /var/www (it should be a subdirectory in www), so you know...

@envygeeks
Copy link
Contributor

We would have to find a way to differentiate internally over whether or not you set the directory or we set the directory because that message hinders normal behavior (re: _site) by warning because it probably will never be empty after the first build, unless you clean.

@superfashi
Copy link
Author

Yes, I'm just suggesting to have a warning like

"The directory you are going to write is not empty, overwrite? (n)"

@envygeeks
Copy link
Contributor

And that's exactly what I'm trying to avoid, the (n) implies it's a prompt which would get annoying for a standard Jekyll user. Actually, it's quite unintuitive with our own default folders.

@envygeeks
Copy link
Contributor

Let me clarify, by avoid I mean only prompt for a non-standard write folder, I do like the idea in general of asking if it's fine to overwrite, just not if we are writing to ./_site

@parkr
Copy link
Member

parkr commented Oct 12, 2015

I think if you use --destination and it's full, it's not unreasonable to fail and say "Use --force to overwrite."

@envygeeks
Copy link
Contributor

I don't know if that's bad UX or not because by nature we overwrite. I'm not against it, I just don't know if that's bad UX because of the nature of what we do. Ultimately though on our systems I think I would much prefer a mixture between the two ideas if --force is sent assume yes otherwise ask like @hanbang-wang suggested.

@superfashi
Copy link
Author

I think --force will be great. Enter a --force after the destination directory allows you to double-check it.

@Leo2807
Copy link

Leo2807 commented Oct 18, 2015

Shouldn't we use something like --force-overwrite or -f overwrite instead of --force? There might be some other things in the future that one'd like to force, and I personally wouldn't like if they conflicted 😕

@envygeeks
Copy link
Contributor

--force is a standard switch used by standard applications across the board. -f whatever is not (normally -f whatever is used for files.) --force-overwrite would be fine, but it's longer, I'm neutral on that subject. We do not force many actions (actually this the first I recall) so a conflict can be resolved later...

On a note: whether or not you add something to our commands is not something we should consider when making our switches. Not to be mean, but we cannot possibly foresee what you might do and we don't necessarily want to support changes you make (that is a personal stance and is not reflective of the entirey of everybody else -- because it's your job to support those changes.)

@Leo2807
Copy link

Leo2807 commented Oct 18, 2015

@envygeeks thanks for the feedback. I have to admit -f something isn't good. Also, on the matter of detecting if a folder was filled by jekyll, maybe we could put a .jekyllout file in every output. That's just my 2c though, I can't --force you to do it. 😉

@superfashi
Copy link
Author

That's a great idea! @Leo2807

@jekyll jekyll locked and limited conversation to collaborators Jul 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants