From 2b86d7880c9673eecf5b86109d75dd7fd4deacc1 Mon Sep 17 00:00:00 2001 From: Ciprian Dorin Craciun Date: Thu, 15 Nov 2018 20:04:26 +0200 Subject: [PATCH] [flags] Minor updates --- sources/cmd/archiver.go | 2 +- sources/lib/common/main.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/sources/cmd/archiver.go b/sources/cmd/archiver.go index 0a88279..c1e5321 100644 --- a/sources/cmd/archiver.go +++ b/sources/cmd/archiver.go @@ -392,7 +392,7 @@ func main_0 () (error) { _sourcesFolder_0 := _flags.String ("sources", "", "") _archiveFile_0 := _flags.String ("archive", "", "") - _compress_0 := _flags.String ("compress", "", "gzip | brotli") + _compress_0 := _flags.String ("compress", "", "gzip | brotli | identity") _debug_0 := _flags.Bool ("debug", false, "") FlagsParse (_flags, 0, 0) diff --git a/sources/lib/common/main.go b/sources/lib/common/main.go index c84770d..bf2d890 100644 --- a/sources/lib/common/main.go +++ b/sources/lib/common/main.go @@ -31,7 +31,11 @@ func FlagsParse (_flags *flag.FlagSet, _argumentsMin uint, _argumentsMax uint) ( _arguments := os.Args[1:] if _error := _flags.Parse (_arguments); _error != nil { - AbortError (_error, fmt.Sprintf ("[8fae7a93] failed parsing arguments: `%v`!", _arguments)) + if _error == flag.ErrHelp { + os.Exit (0) + } else { + AbortError (_error, fmt.Sprintf ("[8fae7a93] failed parsing arguments: `%v`!", _arguments)) + } } _flagsNArg := uint (_flags.NArg ())