Skip to content

Commit 4ce4de3

Browse files
committed
fix: special {{.Files}} argument replacement
Fixes #239
1 parent 0dbf80f commit 4ce4de3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

editor/editor.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"os"
77
"os/exec"
8-
"slices"
98
"strings"
109
"text/template"
1110

@@ -101,7 +100,7 @@ func (ed *editor) substituteArgs(result *lang.GenerateResult) ([]string, error)
101100
for j, f := range result.Files {
102101
allFiles[j] = f.GetPath()
103102
}
104-
args = slices.Insert(args, i, allFiles...)
103+
args = append(args[:i], append(allFiles, args[i+1:]...)...)
105104
break
106105
}
107106
}

0 commit comments

Comments
 (0)