Skip to content

Commit

Permalink
fix(cmd/driver,pkg/driver): avoid using filepath.Join when joining …
Browse files Browse the repository at this point in the history
…hostRoot.

Signed-off-by: Federico Di Pierro <[email protected]>
  • Loading branch information
FedeDP committed Nov 28, 2023
1 parent d762a9c commit ca03adf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/driver/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func checkFalcoRunsWithDrivers(engineKind string) error {
}

func (o *driverConfigOptions) replaceDriverTypeInFalcoConfig(hostRoot string, driverType drivertype.DriverType) error {
falcoCfgFile := filepath.Join(hostRoot, "etc", "falco", "falco.yaml")
falcoCfgFile := hostRoot + "/etc/falco/falco.yaml"
type engineCfg struct {
Kind string `yaml:"kind"`
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/distro/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func getKernelConfig(printer *output.Printer, kr *kernelrelease.KernelRelease, h
func downloadKernelSrc(ctx context.Context,
printer *output.Printer,
kr *kernelrelease.KernelRelease,
url string, hostRoot string,
url, hostRoot string,
stripComponents int,
) (map[string]string, error) {
env := make(map[string]string)
Expand Down
2 changes: 1 addition & 1 deletion pkg/driver/distro/distro_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

func TestDiscoverDistro(t *testing.T) {
hostRoot := "."
etcDir := filepath.Join(hostRoot, "etc")
etcDir := hostRoot + "/etc"
osReleaseFile := filepath.Join(etcDir, "os-release")

type osID struct {
Expand Down

0 comments on commit ca03adf

Please sign in to comment.