Skip to content

Commit

Permalink
fix: return actual error on stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
sh0ji committed Jan 12, 2020
1 parent c706348 commit 0f35a55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { exec } = require('child_process');

const lsRemoteTags = (repo) => new Promise((resolve, reject) => {
exec(`git ls-remote --tags ${repo}`, (error, stdout, stderr) => {
if (stderr) reject(stderr);
if (stderr) reject(new Error(stderr));
resolve(stdout.toString().trim());
});
});
Expand Down

0 comments on commit 0f35a55

Please sign in to comment.