Skip to content

Commit 6d72b3f

Browse files
authored
Fix src batch repo file parameter parsing (#919)
1 parent 4ef7cba commit 6d72b3f

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ All notable changes to `src-cli` are documented in this file.
2323
### Fixed
2424

2525
- Fix network timeout in `src users clean` occuring in instances with many users [#901](https://github.com/sourcegraph/src-cli/pull/901)
26+
- Aligned parsing of spec file parameter of `src batch repos` with other commands. [#919](https://github.com/sourcegraph/src-cli/pull/919)
2627

2728
### Removed
2829

cmd/src/batch_repositories.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ Examples:
5757
return err
5858
}
5959

60+
file, err := getBatchSpecFile(flagSet, fileFlag)
61+
if err != nil {
62+
return err
63+
}
64+
6065
ctx := context.Background()
6166
client := cfg.apiClient(apiFlags, flagSet.Output())
6267

@@ -73,11 +78,6 @@ Examples:
7378
return err
7479
}
7580

76-
var file string
77-
if fileFlag != nil {
78-
file = *fileFlag
79-
}
80-
8181
out := output.NewOutput(flagSet.Output(), output.OutputOpts{Verbose: *verbose})
8282
spec, _, _, err := parseBatchSpec(ctx, file, svc)
8383
if err != nil {

0 commit comments

Comments
 (0)