Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion regolith/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"golang.org/x/mod/semver"
)

const latestCompatibleVersion = "1.4.0"
const latestCompatibleVersion = "1.6.0"

const StandardLibraryUrl = "github.com/Bedrock-OSS/regolith-filters"
const ConfigFilePath = "config.json"
Expand Down
2 changes: 1 addition & 1 deletion regolith/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func GetExportPaths(
if semver.Compare(vFormatVersion, "v1.4.0") < 0 {
bpPath, rpPath, err = getExportPathsV1_2_0(
exportTarget, bpName, rpName)
} else if semver.Compare(vFormatVersion, "v1.4.0") == 0 {
} else if semver.Compare(vFormatVersion, "v1.6.0") <= 0 {
bpPath, rpPath, err = getExportPathsV1_4_0(
exportTarget, bpName, rpName)
} else {
Expand Down
12 changes: 10 additions & 2 deletions regolith/filter.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package regolith

import (
"github.com/Bedrock-OSS/go-burrito/burrito"
"fmt"
"slices"

"github.com/Bedrock-OSS/go-burrito/burrito"
)

type FilterDefinition struct {
Expand Down Expand Up @@ -107,7 +109,13 @@ func filterFromObject(obj map[string]any, id string) (*Filter, error) {
case []any:
s := make([]string, len(arguments))
for i, v := range arguments {
s[i] = v.(string)
s[i], ok = v.(string)
if !ok {
return nil, burrito.WrappedErrorf(
jsonPropertyTypeError,
fmt.Sprintf("arguments->%d", i),
"string")
}
}
filter.Arguments = s
case []string:
Expand Down