X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=main.go;h=1c2e6d82ba631f8ce9b337327cf502f8b4b4b066;hb=ebb04d162f47f4324672813b3eb0ce3137c3e80f;hp=1ada40e5d8126f9302ba1e6cfbfda6f83e9f0520;hpb=5358e812c1a5d16c28ab5fa0c149670790ae673e;p=src%2Fxds%2Fxds-gdb.git diff --git a/main.go b/main.go index 1ada40e..1c2e6d8 100644 --- a/main.go +++ b/main.go @@ -190,8 +190,12 @@ endloop: // Source config env file // (we cannot use confFile var because env variables setting is just after) envMap, confFile, err := loadConfigEnvFile(os.Getenv("XDS_CONFIG"), gdbCmdFile) - if err != nil { - exitError(syscall.ENOENT, err.Error()) + + // Only rise an error when args is not set (IOW when --help or --version is not set) + if len(args) == 1 { + if err != nil { + exitError(syscall.ENOENT, err.Error()) + } } // Managed env vars and create help