(cmd *cobra.Command, cfg storage, v vcs)
| 9 | ) |
| 10 | |
| 11 | func check(cmd *cobra.Command, cfg storage, v vcs) { |
| 12 | if !v.IsRepository() { |
| 13 | ui.PrintErrln(cmd, ui.ErrorStyle, "The current working directory is not a valid git repository.") |
| 14 | os.Exit(1) |
| 15 | } |
| 16 | |
| 17 | if cfg.Len() == 0 { |
| 18 | ui.PrintErrln(cmd, ui.ErrorStyle, `There are no available profiles.`) |
| 19 | ui.Println(cmd, ui.SuccessStyle, `To add a new profile, use the following command:`) |
| 20 | ui.Println(cmd, ui.DefaultStyle, `$ git-profile add`) |
| 21 | os.Exit(0) |
| 22 | } |
| 23 | } |
no test coverage detected