summaryrefslogtreecommitdiff
path: root/runner
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-04-17 00:00:40 +0200
committerewy <ewy0@protonmail.com>2026-04-17 00:00:40 +0200
commit022072ce8bac114ea0a7b94132ed3b8630de2f90 (patch)
tree199fb99ab9e242b6eb195c2b1180e58caa4303d6 /runner
parentfbdc2b9d849913ccf8dd7a9001012ce2d28cbd2f (diff)
* fix bug which prevented multiple sources from showing up in the tui at the same time
* add padding to bottom of sources * add git status panel to bottom of tui
Diffstat (limited to 'runner')
-rw-r--r--runner/shell/hydrated.go13
-rw-r--r--runner/shell/shell.go13
2 files changed, 14 insertions, 12 deletions
diff --git a/runner/shell/hydrated.go b/runner/shell/hydrated.go
index e1f8892..7ead74c 100644
--- a/runner/shell/hydrated.go
+++ b/runner/shell/hydrated.go
@@ -1,7 +1,9 @@
package shell
import (
+ "errors"
"pik/describe"
+ "pik/model"
"pik/runner"
"pik/spool"
)
@@ -22,3 +24,14 @@ func (h *Hydrated) Description() string {
}
return desc
}
+
+var WrongTargetError = errors.New("wrong target type")
+
+func (s *shell) Hydrate(target model.Target) (model.HydratedTarget, error) {
+ cast, ok := target.(*Target)
+ if !ok {
+ return nil, WrongTargetError
+ }
+ hyd := &Hydrated{BaseHydration: runner.Hydrated(cast)}
+ return hyd, nil
+}
diff --git a/runner/shell/shell.go b/runner/shell/shell.go
index 9d34e0f..c9d7134 100644
--- a/runner/shell/shell.go
+++ b/runner/shell/shell.go
@@ -35,17 +35,6 @@ type shell struct {
Locations map[string]string
}
-var WrongTargetError = errors.New("wrong target type")
-
-func (s *shell) Hydrate(target model.Target) (model.HydratedTarget, error) {
- cast, ok := target.(*Target)
- if !ok {
- return nil, WrongTargetError
- }
- hyd := &Hydrated{BaseHydration: runner.Hydrated(cast)}
- return hyd, nil
-}
-
func (s *shell) Wants(f fs.FS, file string, entry fs.DirEntry) (bool, error) {
if entry != nil && entry.IsDir() {
return false, nil
@@ -108,7 +97,7 @@ func (s *shell) CreateTarget(fs fs.FS, src string, file string, _ fs.DirEntry) (
MyTags: model.TagsFromFilename(filename),
},
Shell: shell,
- Script: file,
+ Script: filepath.Join(src, file),
SubValue: sub,
}, nil
}