Skip to content

Commit

Permalink
fix(pkg/options): do not enforce driver version to be semver, since i…
Browse files Browse the repository at this point in the history
…t can also be a commit hash.

Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP authored and poiana committed Dec 6, 2023
1 parent d5893e1 commit 609a8a2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pkg/options/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
package options

import (
"errors"
"fmt"
"net/url"
"path/filepath"
"sort"

"github.com/blang/semver"

"github.com/falcosecurity/falcoctl/internal/config"
drivertype "github.com/falcosecurity/falcoctl/pkg/driver/type"
)
Expand Down Expand Up @@ -67,8 +66,8 @@ func (d *Driver) Validate() error {
return fmt.Errorf("host-root must be an absolute path (%s)", d.HostRoot)
}

if _, err := semver.Parse(d.Version); err != nil {
return fmt.Errorf("version must be semver compatible (%s): %w", d.Version, err)
if d.Version == "" {
return errors.New("version is mandatory and cannot be empty")
}

for _, repo := range d.Repos {
Expand Down

0 comments on commit 609a8a2

Please sign in to comment.