diff options
Diffstat (limited to 'cmd/gotosocial/main.go')
-rw-r--r-- | cmd/gotosocial/main.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd/gotosocial/main.go b/cmd/gotosocial/main.go index 5c610f1a3..7d45c126d 100644 --- a/cmd/gotosocial/main.go +++ b/cmd/gotosocial/main.go @@ -23,7 +23,6 @@ import ( godebug "runtime/debug" "strings" - "codeberg.org/gruf/go-debug" "github.com/spf13/cobra" _ "github.com/superseriousbusiness/gotosocial/docs" @@ -63,11 +62,12 @@ func main() { rootCmd.AddCommand(serverCommands()) rootCmd.AddCommand(debugCommands()) rootCmd.AddCommand(adminCommands()) - if debug.DEBUG { - // only add testrig if debug enabled. - rootCmd.AddCommand(testrigCommands()) + + // Testrigcmd will only be set when debug is enabled. + if testrigCmd := testrigCommands(); testrigCmd != nil { + rootCmd.AddCommand(testrigCmd) } else if len(os.Args) > 1 && os.Args[1] == "testrig" { - log.Fatalln("gotosocial must be built and run with the DEBUG enviroment variable set to enable and access testrig") + log.Fatal("gotosocial must be built and run with the DEBUG enviroment variable set to enable and access testrig") } // run |