Skip to content

Commit 20f9762

Browse files
committed
fixup
1 parent 02a2802 commit 20f9762

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

completion/all.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -103,30 +103,30 @@ func generateCompletion(
103103
func InstallShellCompletion(shell Shell) error {
104104
path, err := shell.InstallPath()
105105
if err != nil {
106-
return fmt.Errorf("failed to get install path: %w", err)
106+
return fmt.Errorf("get install path: %w", err)
107107
}
108108

109109
err = os.MkdirAll(filepath.Dir(path), 0o755)
110110
if err != nil {
111-
return fmt.Errorf("failed to create directories: %w", err)
111+
return fmt.Errorf("create directories: %w", err)
112112
}
113113

114114
if shell.UsesOwnFile() {
115115
err := os.WriteFile(path, nil, 0o644)
116116
if err != nil {
117-
return fmt.Errorf("failed to create or truncate file: %w", err)
117+
return fmt.Errorf("create file: %w", err)
118118
}
119119
}
120120

121121
f, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0o644)
122122
if err != nil {
123-
return fmt.Errorf("failed to open file for appending: %w", err)
123+
return fmt.Errorf("open file for appending: %w", err)
124124
}
125125
defer f.Close()
126126

127127
err = shell.WriteCompletion(f)
128128
if err != nil {
129-
return fmt.Errorf("failed to write completion script: %w", err)
129+
return fmt.Errorf("write completion script: %w", err)
130130
}
131131

132132
return nil

0 commit comments

Comments
 (0)