Skip to content

Commit

Permalink
Merge pull request #41 from jgravois/clear-cache
Browse files Browse the repository at this point in the history
trap failed authentication
  • Loading branch information
ungoldman authored Jul 1, 2016
2 parents 5246e65 + fadd11c commit a970520
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ Override defaults with flags (CLI) or the `options` object (node).

All [releases](https://github.com/ungoldman/gh-release/releases) of `gh-release` were created with `gh-release`.

## Config location

Platform | Location
--- | ---
OS X | `~/Library/Application Support/gh-release/config.json`
Linux (XDG) | `$XDG_CONFIG_HOME/gh-release/config.json`
Linux (Legacy) | `~/.config/gh-release/config.json`
Windows (> Vista) | `%LOCALAPPDATA%/gh-release/config.json`
Windows (XP, 2000) | `%USERPROFILE%/Local Settings/Application Data/gh-release/config.json`

## Motivation

There are packages that already do something like this, and they're great, but I want something that does this one thing really well and nothing else, leans heavily on standards in `package.json` and `CHANGELOG.md`, and can work both as a CLI tool and programmatically in node.
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ function Release (options, callback) {
return callback(new Error(errorMessage))
}

if (body.message === 'Bad credentials') {
return callback(new Error('GitHub says password is no beuno. please clear your cache manually. https://github.com/ungoldman/gh-release#config-location'))
}

if (options.assets) {
var assets = options.assets.map(function (asset) {
return path.join(options.workpath, asset)
Expand Down

0 comments on commit a970520

Please sign in to comment.