Skip to content

Commit 909933b

Browse files
Walzpierrelalanne
authored andcommitted
fix(cli): Set default value for object
1 parent 38c7824 commit 909933b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmd/src-fingerprint/main.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ func runExtract(
2626
objects []string,
2727
after string,
2828
limit int) chan srcfingerprint.PipelineEvent {
29-
// buffer it a bit so it won't block if this is going too fast
29+
// If there is no object, default to an empty object
30+
if len(objects) == 0 {
31+
objects = []string{""}
32+
}
33+
34+
// buffer it a bit, so it won't block if this is going too fast
3035
ch := make(chan srcfingerprint.PipelineEvent, MaxPipelineEvents)
3136

3237
go func(eventChannel chan srcfingerprint.PipelineEvent) {

0 commit comments

Comments
 (0)