Skip to content

Commit

Permalink
fix(publish): Check for git describe error explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
evocateur committed Feb 14, 2019
1 parent ab8cf18 commit 237d1c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commands/publish/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class PublishCommand extends Command {
.then(() => this.verifyWorkingTreeClean())
.catch(err => {
// an execa error is thrown when git suffers a fatal error (such as no git repository present)
if (err.failed && err.code === 128 && err.stderr && /not a git repository/.test(err.stderr)) {
if (err.failed && /git describe/.test(err.cmd)) {
// (we tried)
this.logger.silly("EWORKINGTREE", err.message);
this.logger.notice("FYI", "Unable to verify working tree, proceed at your own risk");
Expand Down

0 comments on commit 237d1c5

Please sign in to comment.