Skip to content

Commit

Permalink
fix: special {{.Files}} argument replacement
Browse files Browse the repository at this point in the history
Fixes #239
  • Loading branch information
j178 committed Nov 12, 2023
1 parent 0dbf80f commit 4ce4de3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions editor/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"os"
"os/exec"
"slices"
"strings"
"text/template"

Expand Down Expand Up @@ -101,7 +100,7 @@ func (ed *editor) substituteArgs(result *lang.GenerateResult) ([]string, error)
for j, f := range result.Files {
allFiles[j] = f.GetPath()
}
args = slices.Insert(args, i, allFiles...)
args = append(args[:i], append(allFiles, args[i+1:]...)...)
break
}
}
Expand Down

0 comments on commit 4ce4de3

Please sign in to comment.