Closed pmario closed 2 months ago
@linonetwo @saqimtiaz -- Can you imagine a configuration, where it would make sense to run a server with an invalid path name?
@linonetwo @saqimtiaz -- Can you imagine a configuration, where it would make sense to run a server with an invalid path name?
The canonical example of using an invalid pathname is when initialising a new wiki:
tiddlywiki ./MyWikiFolder --init empty
The canonical example of using an invalid pathname is when initialising a new wiki:
tiddlywiki ./MyWikiFolder --init empty
Yes, but that does not touch the code of the --listen
command. The important thing here is --listen
Hi @pmario so you are suggesting that the --listen
command should check for a valid wiki folder and raise an error if there isn't one.
That's not right. TiddlyWiki can be run without a wiki folder. For example:
tiddlywiki --load <somedata> --listen
It is not necessary for there to be a wiki folder in order for TiddlyWiki to function correctly.
OK. --load
is an argument. But if you use tiddlywiki invalid-path --listen
there is still a problem
Hi @pmario the "problem" here is just that there is no theme plugin loaded. If we think that that is confusing then perhaps a better approach would be to make the core display a warning banner if there is no theme plugin loaded. I think that could be done in wikitext as a page template segment.
I don't use cli, I only call its JS api, so I have no opinion here.
If I run
tiddlywiki invalid-path --listen
, it does still start a server - IMO it should notThis issue is related to: Add some new scripts to package.json, to make npm run command easier #8294
Proposal
It should produce "Error" instead of "Warning" -- and stop
Command to replicate the problem
It prints this info:
So it knows, that it will not work. But it still runs a server that will create this: