Skip to content

Commit

Permalink
bump cli version for update fix
Browse files Browse the repository at this point in the history
  • Loading branch information
verdverm committed May 14, 2020
1 parent 60d0e90 commit c5ca824
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .hof/Cli/cmd/hof/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func RootPersistentPreRun(args []string) (err error) {

func RootPersistentPostRun(args []string) (err error) {

PrintUpdateAvailable()
WaitPrintUpdateAvailable()

return err
}
Expand Down
6 changes: 5 additions & 1 deletion .hof/Cli/cmd/hof/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ var UpdateCmd = &cobra.Command{
return
} else {
if UpdateCheckFlag {
PrintUpdateAvailable()
return
}
}
Expand Down Expand Up @@ -180,7 +181,10 @@ func CheckUpdate(manual bool) (ver ProgramVersion, err error) {
return ver, nil
}

func WaitPrintUpdateAvail() {
func WaitPrintUpdateAvailable() {
if os.Getenv("HOF_UPDATES_DISABLED") != "" {
return
}
for i := 0; i < 20 && !UpdateStarted && !UpdateChecked && !UpdateErrored; i++ {
time.Sleep(50 * time.Millisecond)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/hof/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func RootPersistentPreRun(args []string) (err error) {

func RootPersistentPostRun(args []string) (err error) {

PrintUpdateAvailable()
WaitPrintUpdateAvailable()

return err
}
Expand Down
6 changes: 5 additions & 1 deletion cmd/hof/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ var UpdateCmd = &cobra.Command{
return
} else {
if UpdateCheckFlag {
PrintUpdateAvailable()
return
}
}
Expand Down Expand Up @@ -180,7 +181,10 @@ func CheckUpdate(manual bool) (ver ProgramVersion, err error) {
return ver, nil
}

func WaitPrintUpdateAvail() {
func WaitPrintUpdateAvailable() {
if os.Getenv("HOF_UPDATES_DISABLED") != "" {
return
}
for i := 0; i < 20 && !UpdateStarted && !UpdateChecked && !UpdateErrored; i++ {
time.Sleep(50 * time.Millisecond)
}
Expand Down
2 changes: 1 addition & 1 deletion cue.mods
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/hofstadter-io/hof
cue master

require (
github.com/hofstadter-io/hofmod-cli v0.5.5
github.com/hofstadter-io/hofmod-cli v0.5.6
github.com/hofstadter-io/mvs v0.7.6
)
2 changes: 2 additions & 0 deletions cue.sums
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ github.com/hofstadter-io/hofmod-cli v0.5.4 h1:bO72JKO70dnmRBOV/c9IbTXQZuhsParhuw
github.com/hofstadter-io/hofmod-cli v0.5.4/cue.mods h1:8TVLRMLOvfcVRZu6NqDr4VFmvuw/9Ca7YpCMo1fTRmU=
github.com/hofstadter-io/hofmod-cli v0.5.5 h1:U39psc0wrKEEdYiNZ5+9b+50PyxFLCeQ7b3mC64SBas=
github.com/hofstadter-io/hofmod-cli v0.5.5/cue.mods h1:8TVLRMLOvfcVRZu6NqDr4VFmvuw/9Ca7YpCMo1fTRmU=
github.com/hofstadter-io/hofmod-cli v0.5.6 h1:o64aCgzhH62fZvpa2uK+bENIfXrEcMHfXCHuMJTxoFw=
github.com/hofstadter-io/hofmod-cli v0.5.6/cue.mods h1:8TVLRMLOvfcVRZu6NqDr4VFmvuw/9Ca7YpCMo1fTRmU=
github.com/hofstadter-io/mvs v0.0.0 h1:/rMWV7c92qpH/hyl8Ibi/DSUhrGDgDeKBtFkZeD+SMo=
github.com/hofstadter-io/mvs v0.0.0/cue.mods h1:Bt+zMXYlsncBuI+lyMWfRLObqOt+HNOCAO/DDh1Mf+M=
github.com/hofstadter-io/mvs v0.4.4 h1:hw65QjfvxPjeUimqurEbTuwnDLSj/GUABKsHUymaW2g=
Expand Down

0 comments on commit c5ca824

Please sign in to comment.