mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-10 06:14:22 +00:00
Generalize to read filter from file or stdin.
This commit is contained in:
committed by
Gordian Schoenherr
parent
a5d322252a
commit
005114839a
@@ -60,7 +60,12 @@ func aptlySnapshotFilter(cmd *commander.Command, args []string) error {
|
||||
// Initial queries out of arguments
|
||||
queries := make([]deb.PackageQuery, len(args)-2)
|
||||
for i, arg := range args[2:] {
|
||||
queries[i], err = query.Parse(arg)
|
||||
var q string
|
||||
q, err = getContent(arg)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to read package query from file %s: %w", arg, err)
|
||||
}
|
||||
queries[i], err = query.Parse(q)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to parse query: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user