Open Jermolene opened 9 years ago
IMO --rendertiddlers
also deletes the target directory. ... So please make sure, that it's impossible to delete rootfolder
or delete folder with valuable content
by accident.
I can see how we could detect and prevent attempts to delete the root directory (at least on Unix-like systems), but how could we do a better job of avoiding deleting valuable content?
but how could we do a better job of avoiding deleting valuable content?
I'm not really sure. I was thinking about a "non empty" warning. ... But eg: "static" will not be empty, that's why we need to delete it :) So the answer there would be always "yes .. delete"
May be a user intervention needed, if --output parameter points to a higher directory, than the current working directory.
The reason why I found out, that some warnings may be useful is this:
I knew, that --rendertiddlers will delete the output folder. I just couldn't remember anymore. .... So if --rendertiddlers is used from the command line, I personally would always want some feedback.
If --rendertiddlers is used from tiddlywiki.info file, there should be an option to switch feedback off.
Hi @pmario
The safest behaviour would maybe be for rendertiddlers to complain if the output directly isn't empty. So users would need to delete the old files before running rendertiddlers.
But I'm not keen on that because it means that there is a platform specific step that can't be performed by the --build
command.
May be a user intervention needed, if --output parameter points to a higher directory, than the current working directory.
Well, one might have the current directory inside output/static
because one is inspecting the files. That shouldn't prevent one from running a build.
I'm not sure, how we can solve it and I also think, I'm a bit off topic at this issue. ...
What happens if I write --output .
? which imo is an example somewhere.
... I just want to be sure, that we don't delete anything of value, because most users have no backups.
The command --output .
will change the output directory from the default of the edition/output
directory to the current directory.
In
--verbose
mode, the--savetiddler
,--rendertiddler
and--rendertiddlers
commands should output the paths to the files that they create: