github.com/singlemusic/buffalo@v0.16.30/buffalo/cmd/plugins/internal/cache/build.go (about)

     1  package cache
     2  
     3  import (
     4  	"os"
     5  
     6  	"github.com/gobuffalo/buffalo/plugins"
     7  	"github.com/spf13/cobra"
     8  )
     9  
    10  // BuildCmd rebuilds the plugins cache
    11  var BuildCmd = &cobra.Command{
    12  	Use:   "build",
    13  	Short: "rebuilds the plugins cache",
    14  	RunE: func(cmd *cobra.Command, args []string) error {
    15  		os.RemoveAll(plugins.CachePath)
    16  		_, err := plugins.Available()
    17  		return err
    18  	},
    19  }