updated GHA
Update to v2 SDK updated dependencies
This commit is contained in:
18
vendor/github.com/posener/complete/cmd/install/fish.go
generated
vendored
18
vendor/github.com/posener/complete/cmd/install/fish.go
generated
vendored
@ -16,10 +16,7 @@ type fish struct {
|
||||
|
||||
func (f fish) Install(cmd, bin string) error {
|
||||
completionFile := filepath.Join(f.configDir, "completions", fmt.Sprintf("%s.fish", cmd))
|
||||
completeCmd, err := f.cmd(cmd, bin)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
completeCmd := f.cmd(cmd, bin)
|
||||
if _, err := os.Stat(completionFile); err == nil {
|
||||
return fmt.Errorf("already installed at %s", completionFile)
|
||||
}
|
||||
@ -36,10 +33,10 @@ func (f fish) Uninstall(cmd, bin string) error {
|
||||
return os.Remove(completionFile)
|
||||
}
|
||||
|
||||
func (f fish) cmd(cmd, bin string) (string, error) {
|
||||
func (f fish) cmd(cmd, bin string) string {
|
||||
var buf bytes.Buffer
|
||||
params := struct{ Cmd, Bin string }{cmd, bin}
|
||||
tmpl := template.Must(template.New("cmd").Parse(`
|
||||
template.Must(template.New("cmd").Parse(`
|
||||
function __complete_{{.Cmd}}
|
||||
set -lx COMP_LINE (string join ' ' (commandline -o))
|
||||
test (commandline -ct) = ""
|
||||
@ -47,10 +44,7 @@ function __complete_{{.Cmd}}
|
||||
{{.Bin}}
|
||||
end
|
||||
complete -c {{.Cmd}} -a "(__complete_{{.Cmd}})"
|
||||
`))
|
||||
err := tmpl.Execute(&buf, params)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return buf.String(), nil
|
||||
`)).Execute(&buf, params)
|
||||
|
||||
return string(buf.Bytes())
|
||||
}
|
||||
|
2
vendor/github.com/posener/complete/cmd/install/install.go
generated
vendored
2
vendor/github.com/posener/complete/cmd/install/install.go
generated
vendored
@ -51,7 +51,7 @@ func Uninstall(cmd string) error {
|
||||
for _, i := range is {
|
||||
errI := i.Uninstall(cmd, bin)
|
||||
if errI != nil {
|
||||
err = multierror.Append(err, errI)
|
||||
multierror.Append(err, errI)
|
||||
}
|
||||
}
|
||||
|
||||
|
5
vendor/github.com/posener/complete/cmd/install/utils.go
generated
vendored
5
vendor/github.com/posener/complete/cmd/install/utils.go
generated
vendored
@ -115,10 +115,7 @@ func removeContentToTempFile(name, content string) (string, error) {
|
||||
if str == content {
|
||||
continue
|
||||
}
|
||||
_, err = wf.WriteString(str + "\n")
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
wf.WriteString(str + "\n")
|
||||
prefix = prefix[:0]
|
||||
}
|
||||
return wf.Name(), nil
|
||||
|
Reference in New Issue
Block a user