Skip to content

Commit

Permalink
Fix repeated version_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Jul 9, 2021
1 parent 5afed16 commit 7eec3d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@ async function getToolSemver(data) {
return data['version'];
}
else {
return JSON.parse(response['data']).pop()['ref'].split('/').pop();
const tag = JSON.parse(response['data']).pop()['ref'].split('/').pop();
return tag.replace(/^v(\d)/, '$1');
}
}
exports.getToolSemver = getToolSemver;
Expand Down
3 changes: 2 additions & 1 deletion src/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export async function getToolSemver(
data['error'] = response.error ?? `No version found with prefix ${ref}.`;
return data['version'];
} else {
return JSON.parse(response['data']).pop()['ref'].split('/').pop();
const tag = JSON.parse(response['data']).pop()['ref'].split('/').pop();
return tag.replace(/^v(\d)/, '$1');
}
}

Expand Down

0 comments on commit 7eec3d7

Please sign in to comment.