Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
adding purge
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Jun 6, 2017
1 parent 488afa0 commit bb7e553
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cmd/purge.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package cmd

import (
"fmt"
"os"

"github.com/getantibody/antibody/antibodylib"
"github.com/getantibody/antibody/project"
"github.com/spf13/cobra"
)

var purgeCmd = &cobra.Command{
Use: "purge",
Aliases: []string{"rm"},
Short: "removes a dependency from your filesystem",
RunE: func(cmd *cobra.Command, args []string) error {
fmt.Println("Removing", args[0])
return os.RemoveAll(project.New(antibodylib.Home(), args[0]).Folder())
},
}

func init() {
RootCmd.AddCommand(purgeCmd)
}

0 comments on commit bb7e553

Please sign in to comment.