this repo has no description smallweb.run
smallweb
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: simplify sync command argument handling

pomdtr eefc3ddf a8543982

+3 -9
+3 -9
cmd/sync.go
··· 11 11 12 12 func NewCmdSync() *cobra.Command { 13 13 return &cobra.Command{ 14 - Use: "sync <remote> [remote-dir]", 14 + Use: "sync <remote>", 15 15 Short: "Sync the smallweb config with the filesystem", 16 16 PreRunE: func(cmd *cobra.Command, args []string) error { 17 17 return checkMutagen() 18 18 }, 19 - Args: cobra.RangeArgs(1, 2), 19 + Args: cobra.ExactArgs(1), 20 20 RunE: func(cmd *cobra.Command, args []string) error { 21 - var alpha string 22 - if len(args) == 1 { 23 - alpha = fmt.Sprintf("./%s:smallweb", args[0]) 24 - } else { 25 - alpha = fmt.Sprintf("%s:%s", args[0], args[1]) 26 - } 27 - 21 + alpha := args[0] 28 22 beta := k.String("dir") 29 23 30 24 syncName := strings.Replace(k.String("domain"), ".", "-", -1)