From 47415cc7e9ff17016264982ce3d7de3fd907dba7 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 4 May 2021 17:08:33 +0100 Subject: fixed problem of repeating Setup() procedure --- datamaps/config.go | 7 ++++++- datamaps/main | Bin 13848736 -> 0 bytes 2 files changed, 6 insertions(+), 1 deletion(-) delete mode 100755 datamaps/main (limited to 'datamaps') diff --git a/datamaps/config.go b/datamaps/config.go index ec6f91e..590e07d 100644 --- a/datamaps/config.go +++ b/datamaps/config.go @@ -15,6 +15,10 @@ const ( const Usage = ` usage: datamaps COMMAND [OPTIONS] +datamaps will NOT create configuration files automatically. Ensure this is handled by +calling: "datamaps setup". This will create the database file required to run the +application. + -Managing datamap files- Command: datamap @@ -62,6 +66,7 @@ func NewDBPathChecker(h getUserConfigDir) *DBPathChecker { // Check returns true if the necessary config files (including // the database) are in place - false if not func (db *DBPathChecker) Check() bool { + println("In Check() method") userConfig, err := db.userConfig() if err != nil { log.Fatal(err) @@ -216,7 +221,7 @@ func nextString(args []string, i *int, message string) string { func processOptions(opts *Options, allArgs []string) { if len(allArgs) == 0 { - allArgs = append(allArgs, "help") + allArgs = append(allArgs, "checkdb") } switch allArgs[0] { case "import": diff --git a/datamaps/main b/datamaps/main deleted file mode 100755 index a781830..0000000 Binary files a/datamaps/main and /dev/null differ -- cgit v1.2.3