Compare commits

4 Commits

4 changed files with 8 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
# RPS (Robot Pits Helper) # RPH (Robot Pits Helper)
Manage your FRC robot code the UNIX way. Manage your FRC robot code the UNIX way.
## Installing ## Installing

View File

@@ -26,6 +26,10 @@ options in using the following flags:
Example: Example:
rph template --lang=java --type=commandbased --dir=MyRobot --team=5438 --desktopSupport=false`, rph template --lang=java --type=commandbased --dir=MyRobot --team=5438 --desktopSupport=false`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
// This is a noop to stop the root command from preventing us from making
// a new robot project
},
PreRun: func(cmd *cobra.Command, args []string) { PreRun: func(cmd *cobra.Command, args []string) {
template.Fetch(false, "keep") template.Fetch(false, "keep")
}, },

View File

@@ -54,7 +54,7 @@ func GenerateProject(opts TemplateOptions) {
return return
} }
subFS, err := fs.Sub(fsys, filepath.Join(opts.Lang, opts.ProjectType)) subFS, err := fs.Sub(fsys, path.Join(opts.Lang, opts.ProjectType))
if err != nil { if err != nil {
slog.Error("Unable to find project template", "template", opts.ProjectType, "error", err) slog.Error("Unable to find project template", "template", opts.ProjectType, "error", err)
} }

View File

@@ -11,13 +11,8 @@ import (
// vendordeplistCmd represents the vendordep list command // vendordeplistCmd represents the vendordep list command
var vendordeplistCmd = &cobra.Command{ var vendordeplistCmd = &cobra.Command{
Use: "list", Use: "list",
Short: "List out your vendordeps", Short: "List out your installed vendordeps",
Long: `A longer description that spans multiple lines and likely contains examples Long: `List out your installed vendordeps.`,
and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Aliases: []string{ "ls" }, Aliases: []string{ "ls" },
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
if !inProjectDir() { return nil } if !inProjectDir() { return nil }