Skip to content

Commit 0d77470

Browse files
committed
fix(pkg/options): do not enforce driver version to be semver, since it can also be a commit hash.
Signed-off-by: Federico Di Pierro <[email protected]>
1 parent d5893e1 commit 0d77470

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/options/driver.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@
1616
package options
1717

1818
import (
19+
"errors"
1920
"fmt"
2021
"net/url"
2122
"path/filepath"
2223
"sort"
2324

24-
"github.com/blang/semver"
25-
2625
"github.com/falcosecurity/falcoctl/internal/config"
2726
drivertype "github.com/falcosecurity/falcoctl/pkg/driver/type"
2827
)
@@ -67,8 +66,8 @@ func (d *Driver) Validate() error {
6766
return fmt.Errorf("host-root must be an absolute path (%s)", d.HostRoot)
6867
}
6968

70-
if _, err := semver.Parse(d.Version); err != nil {
71-
return fmt.Errorf("version must be semver compatible (%s): %w", d.Version, err)
69+
if len(d.Version) == 0 {
70+
return errors.New("version is mandatory")
7271
}
7372

7473
for _, repo := range d.Repos {

0 commit comments

Comments
 (0)