mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Fix repeated version_prefix
This commit is contained in:
parent
5afed16e5f
commit
7eec3d790d
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -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;
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user