Commit graph

22 commits

Author SHA1 Message Date
Corey Johnson
9becb5f790 Have one place manage the config dir location 2019-12-13 16:16:46 -08:00
Corey Johnson
6f339285b5 Whoops 2019-12-11 16:48:48 -08:00
Corey Johnson
9428df4597 Fix tests 2019-12-11 16:48:33 -08:00
Mislav Marohnić
aaad263a3e Update output of upgrade available notice
- Individual components are now colored
- We don't say "Release notes" anymore since the URL doesn't contain
  any release notes yet
2019-12-04 15:14:48 +01:00
Mislav Marohnić
ba0a441e23 Allow configuring the update notifier from the outside
To test the update notifier:

    rm -f bin/gh; GH_VERSION=v0.2.3 LDFLAGS='-X main.updaterEnabled=github/homebrew-gh' make
2019-12-04 15:07:10 +01:00
Mislav Marohnić
67f0cf3ce3 Improvements to update notifier
- Only report an update available if the version number of the release
  is greater than the current version

- Removes `command` dependency from `update` package; instead, pass
  current version as an argument

- Remove `brew upgrade` instructions since we can't be certain that gh
  was installed via Homebrew in the first place.

- Does not check for updates unless stderr is a tty

- Preserve stderr color output even if stdout is not a tty

- Fixes stderr color output on Windows
2019-12-04 14:47:27 +01:00
Corey Johnson
fb7ea2c6a6 Don't use env vars! 2019-12-03 12:16:29 -08:00
Corey Johnson
f8f0aa829e Only run in prod 2019-12-02 15:57:34 -08:00
Corey Johnson
427a76d728 Use the same words 2019-12-02 15:11:19 -08:00
Corey Johnson
2c86c1d139 Remove line 2019-12-02 15:09:37 -08:00
Corey Johnson
1231ddd01c Add test 2019-12-02 15:08:36 -08:00
Corey Johnson
de98dbd378 Make the "check update" interface a little cleaner 2019-12-02 10:28:00 -08:00
Corey Johnson
3b765d9236 Only print the func if there is a function to print! 2019-11-22 13:48:19 -08:00
Corey Johnson
e95594675d Move to it's own package 2019-11-22 10:55:23 -08:00
Corey Johnson
7a17f9506a Remove bang
Co-Authored-By: Josh Abernathy <joshaber@gmail.com>
2019-11-20 15:59:45 -08:00
Corey Johnson
5a3a2cf95e Go routine it
Co-Authored-By: Josh Abernathy <joshaber@gmail.com>
2019-11-20 15:58:23 -08:00
Corey Johnson
817b154705 Get latest version
Co-Authored-By: Josh Abernathy <joshaber@gmail.com>
2019-11-20 11:07:17 -08:00
Mislav Marohnić
e87775845d Also print cmd usage string on "unknown command" 2019-10-31 22:44:43 +01:00
Mislav Marohnić
faa96be9ea Ensure that errors are printed to stderr 2019-10-31 15:46:38 +01:00
Mislav Marohnić
a6e61a3a8d Silence Cobra usage on errors
When an error occurs anywhere in a command, Cobra used to print the
error itself and command usage help.

We already print error in `main()`, and we don't want to use command
usage string on anything other than flag-parsing errors.

This also fixes the double output of each error.
2019-10-31 13:47:10 +01:00
Mislav Marohnić
adf5a832fe Rename to "github/gh-cli" 2019-10-04 10:50:12 +02:00
nate smith
8dd03144ff initial commit 2019-10-03 22:20:31 -05:00