From 022072ce8bac114ea0a7b94132ed3b8630de2f90 Mon Sep 17 00:00:00 2001 From: ewy Date: Fri, 17 Apr 2026 00:00:40 +0200 Subject: * 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 --- runner/shell/hydrated.go | 13 +++++++++++++ runner/shell/shell.go | 13 +------------ 2 files changed, 14 insertions(+), 12 deletions(-) (limited to 'runner') 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 } -- cgit v1.3