Skip to content

Commit

Permalink
fix bug with github subcommand flags not being processed
Browse files Browse the repository at this point in the history
  • Loading branch information
lhopki01 committed Jun 3, 2019
1 parent a9f5fc9 commit 79b084e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ Tool to sync all repos for a github org or in a local directory

#### Sync all repos in a github org

`brew tap lhopki01/git-mass-sync [email protected]:lhopki01/git-mass-sync`
`brew intall git-mass-sync`
```
brew tap lhopki01/git-mass-sync [email protected]:lhopki01/git-mass-sync
brew intall git-mass-sync
```

#### Find all git repos in a local directory and run hub sync on them

Expand Down
4 changes: 2 additions & 2 deletions cmd/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func init() {
githubCmd.Flags().String("regex", ".*", "Regex to match repo names against")
githubCmd.Flags().String("archive-dir", "", "Repo to put archived repos in\n(default is .archive in the download dir)")

err := viper.BindPFlags(githubCmd.PersistentFlags())
err := viper.BindPFlags(githubCmd.Flags())
if err != nil {
log.Fatalf("Binding flags failed: %s", err)
}
Expand All @@ -85,7 +85,7 @@ func processFlags(args []string) (string, string, string, *regexp.Regexp) {
fmt.Println("=============")
fmt.Printf("Syncing org %s into %s\n", org, dir)

archiveDir := viper.GetString("archive-Dir")
archiveDir := viper.GetString("archive-dir")
if archiveDir == "" {
archiveDir = fmt.Sprintf("%s/.archive", dir)
} else {
Expand Down

0 comments on commit 79b084e

Please sign in to comment.