Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "pasta", Short: "pasta - copy files between repositories", Run: func(cmd *cobra.Command, args []string) { if versionFlag { v := version if v == "" { v = "<unknown version>" } fmt.Println(v) os.Exit(0) } pathToYaml, err := findPastaFile() if err != nil { fmt.Fprintf(os.Stderr, "Error trying to find pasta file: %v\n", err) os.Exit(-1) } cfg, err := newPastaConf(pathToYaml) if err != nil { fmt.Fprintf(os.Stderr, "Error while parsing config: %v\n", err) os.Exit(-2) } if len(cfg.Deps) == 0 { fmt.Printf("No dependencies found in '%s'\n", pathToYaml) return } if dryRunFlag { fmt.Println("--dry-run is set, here's what would happen:") fmt.Println() } ctx := context.Background() err = pasta.Run(ctx, cfg.dependencies, dryRunFlag, cfg.KeepDirs, pathToYaml) if err != nil { fmt.Fprintf(os.Stderr, "Error while running pasta: %v\n", err) os.Exit(-4) } }, }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.