Function
createSymlink
(completionFilePath string, symlinkToCompletionFile string)
Source from the content-addressed store, hash-verified
| 64 | } |
| 65 | |
| 66 | func createSymlink(completionFilePath string, symlinkToCompletionFile string) error { |
| 67 | err := os.Symlink(completionFilePath, symlinkToCompletionFile) |
| 68 | if err != nil { |
| 69 | return err |
| 70 | } |
| 71 | |
| 72 | if verbose { |
| 73 | fmt.Printf("Created symbolic link [%q=>%q]\n", completionFilePath, symlinkToCompletionFile) |
| 74 | } |
| 75 | |
| 76 | return nil |
| 77 | } |
| 78 | |
| 79 | func createCompletionFile(completionFilePath string) error { |
| 80 | if err := RootCmd.GenBashCompletionFile(completionFilePath); err != nil { |
Tested by
no test coverage detected