From bde399a563cec3452ae8cf5bf9032ebb81c72958 Mon Sep 17 00:00:00 2001 From: mah0x211 Date: Thu, 28 Sep 2023 22:37:07 +0900 Subject: [PATCH] Change behavior to display help when executed without arguments --- main.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 2cb3621..1e9eac8 100644 --- a/main.go +++ b/main.go @@ -205,7 +205,7 @@ func writeFile(file string, perm os.FileMode, src io.Reader) error { } func hasRequiredDirs() bool { - // create required directories + // check required directories for _, dir := range []string{ LenvDir, SrcDir, LuaCfg.RootDir, LuaJitCfg.RootDir, } { @@ -239,9 +239,10 @@ func CheckLuaRocksRootDir() { func start() { argv := os.Args[1:] if len(argv) == 0 { - checkInitialized() CmdHelp(0) - } else if argv[0] != "setup" { + } + + if argv[0] != "setup" { checkInitialized() }