Skip to content

Commit

Permalink
Fixed problem with remote filters not being able to read filter.json …
Browse files Browse the repository at this point in the history
…file while f.Run().
  • Loading branch information
Nusiq committed Jan 16, 2022
1 parent 9201d86 commit 31ca446
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion regolith/filter_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ func (f *RemoteFilter) Run(absoluteLocation string) error {

path := UrlToPath(f.Url)
absolutePath, _ := filepath.Abs(path)
filterCollection, err := FilterCollectionFromFilterJson(path)
filterCollection, err := FilterCollectionFromFilterJson(
filepath.Join(path, "filter.json"))
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion regolith/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func RunProfile(profileName string) error {
// FilterCollectionFromFilterJson returns a collection of filters from a
// "filter.json" file of a remote filter.
func FilterCollectionFromFilterJson(path string) (*FilterCollection, error) {
result := &FilterCollection{}
result := &FilterCollection{Filters: []FilterRunner{}}
file, err := ioutil.ReadFile(path)

if err != nil {
Expand Down

0 comments on commit 31ca446

Please sign in to comment.