X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/0ec937fd42be7f1d3757eba48fa944627dfe591d..c592128fda794f2679a117a881c2f7d86ae091e0:/tools/sync-users/sync-users.go diff --git a/tools/sync-users/sync-users.go b/tools/sync-users/sync-users.go index f9f8b6046c..45b6e96b87 100644 --- a/tools/sync-users/sync-users.go +++ b/tools/sync-users/sync-users.go @@ -123,8 +123,10 @@ func ParseFlags(cfg *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 == "" {