fix(versioner): handle invalid empty command (#10836)

Same same

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-07-26 18:51:53 +00:00
committed by GitHub
parent b8a255cc96
commit 733f63592f
2 changed files with 17 additions and 0 deletions
+3
View File
@@ -111,6 +111,9 @@ func (v external) prepareCommand(filePath string) (*exec.Cmd, error) {
if err != nil {
return nil, fmt.Errorf("command is invalid: %w", err)
}
if len(words) == 0 {
return nil, errors.New("command is empty")
}
context := map[string]string{
"%FOLDER_FILESYSTEM%": string(v.filesystem.Type()),