Skip to content

Commit

Permalink
Event-generator executable path is now available to actions
Browse files Browse the repository at this point in the history
Signed-off-by: GLVS Kiriti <[email protected]>
  • Loading branch information
GLVSKiriti authored and poiana committed Apr 8, 2024
1 parent d2ef0d6 commit 1102265
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions events/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ type Helper interface {
// InContainer returns true if the application is running in a container.
// Useful to skip actions which won't work within a container.
InContainer() bool

// ExePath returns the path of the event-generator executable
ExePath() string
}

// An Action triggers an event.
Expand Down
5 changes: 5 additions & 0 deletions pkg/runner/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type helper struct {
hasLog bool
builder *resource.Builder
cleanup func()
exePath string
}

func (h *helper) Log() *logger.Entry {
Expand Down Expand Up @@ -114,3 +115,7 @@ func (h *helper) Spawned() bool {
func (h *helper) InContainer() bool {
return h.runner.inCnt
}

func (h *helper) ExePath() string {
return h.runner.exePath
}

0 comments on commit 1102265

Please sign in to comment.