kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Only show command line help if no arguments are provided
Previously we were checking in a way that meant that `tiddlywiki <wiki>` would trigger the help message.print-window-tiddler
rodzic
8239275edb
commit
af34fbbca3
|
@ -1481,6 +1481,10 @@ $tw.boot.startup = function(options) {
|
||||||
// System paths and filenames
|
// System paths and filenames
|
||||||
$tw.boot.bootPath = path.dirname(module.filename);
|
$tw.boot.bootPath = path.dirname(module.filename);
|
||||||
$tw.boot.corePath = path.resolve($tw.boot.bootPath,"../core");
|
$tw.boot.corePath = path.resolve($tw.boot.bootPath,"../core");
|
||||||
|
// If there's no arguments then default to `--help`
|
||||||
|
if($tw.boot.argv.length === 0) {
|
||||||
|
$tw.boot.argv = ["--help"];
|
||||||
|
}
|
||||||
// If the first command line argument doesn't start with `--` then we
|
// If the first command line argument doesn't start with `--` then we
|
||||||
// interpret it as the path to the wiki folder, which will otherwise default
|
// interpret it as the path to the wiki folder, which will otherwise default
|
||||||
// to the current folder
|
// to the current folder
|
||||||
|
|
|
@ -223,12 +223,8 @@ exports.startup = function() {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// On the server, start a commander with the command line arguments
|
// On the server, start a commander with the command line arguments
|
||||||
var args = $tw.boot.argv;
|
|
||||||
if(args.length === 0) {
|
|
||||||
args = ["--help"];
|
|
||||||
}
|
|
||||||
commander = new $tw.Commander(
|
commander = new $tw.Commander(
|
||||||
args,
|
$tw.boot.argv,
|
||||||
function(err) {
|
function(err) {
|
||||||
if(err) {
|
if(err) {
|
||||||
console.log("Error: " + err);
|
console.log("Error: " + err);
|
||||||
|
|
Ładowanie…
Reference in New Issue