X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0ec937fd42be7f1d3757eba48fa944627dfe591d..c592128fda794f2679a117a881c2f7d86ae091e0:/tools/sync-groups/sync-groups.go diff --git a/tools/sync-groups/sync-groups.go b/tools/sync-groups/sync-groups.go index e1e054a663..daec5c9957 100644 --- a/tools/sync-groups/sync-groups.go +++ b/tools/sync-groups/sync-groups.go @@ -181,8 +181,10 @@ func ParseFlags(config *ConfigParams) error { // Input file as a required positional argument if flags.NArg() == 0 { return fmt.Errorf("please provide a path to an input file") + } else if flags.NArg() > 1 { + return fmt.Errorf("please provide just one input file argument") } - srcPath := &os.Args[flags.NFlag()+1] + srcPath := &os.Args[len(os.Args)-1] // Validations if *srcPath == "" {