Package subcommand code
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
package alias
|
||||
|
||||
import (
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/cmd/util"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"gitea.libretechconsulting.com/rmcguire/git-project-manager/cmd/util"
|
||||
)
|
||||
|
||||
var AliasCmd = &cobra.Command{
|
||||
@@ -23,7 +24,7 @@ func aliasCmdPreRun(cmd *cobra.Command, args []string) {
|
||||
}
|
||||
|
||||
func mustHaveAliases(cmd *cobra.Command, args []string) {
|
||||
utils := util.MustFromCtx(cmd.Context())
|
||||
utils = util.MustFromCtx(cmd.Context())
|
||||
|
||||
if len(utils.Cache().Aliases) == 0 {
|
||||
utils.Logger().Fatal("No aliases set, nothing to " + cmd.Name())
|
||||
|
||||
Reference in New Issue
Block a user