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

Commit

Permalink
Merge pull request #183 from getantibody/purge
Browse files Browse the repository at this point in the history
Purge
  • Loading branch information
caarlos0 committed Jun 6, 2017
2 parents 488afa0 + bb7e553 commit 26bd59e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cmd/purge.go
@@ -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 26bd59e

Please sign in to comment.