Skip to content

Commit

Permalink
rthooks: setup do not copy binary twice
Browse files Browse the repository at this point in the history
For oci-hooks, the binary is copied twice. No need for that, remove the
second copy.

Fixes: f991383

Signed-off-by: Kornilios Kourtis <[email protected]>
  • Loading branch information
kkourt committed Aug 12, 2024
1 parent d6f55c3 commit 03563e2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions contrib/tetragon-rthooks/cmd/setup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ func (i *Install) ociHooksInstall(log *slog.Logger) {
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
}

// copy the binary to the host
i.copyBinary(log)

// add .json file to oci hooks dir
_, binBaseName := path.Split(i.LocalBinary)
binFname := filepath.Join(i.HostInstallDir, binBaseName)
Expand Down Expand Up @@ -115,6 +112,7 @@ func (i *Install) ociHooksInstall(log *slog.Logger) {

func (i *Install) Run(log *slog.Logger) error {

// copy the binary to the host
i.copyBinary(log)
switch i.Interface {
case "oci-hooks":
Expand Down

0 comments on commit 03563e2

Please sign in to comment.