mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +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'];
|
return data['version'];
|
||||||
}
|
}
|
||||||
else {
|
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;
|
exports.getToolSemver = getToolSemver;
|
||||||
|
@ -11,7 +11,8 @@ export async function getToolSemver(
|
|||||||
data['error'] = response.error ?? `No version found with prefix ${ref}.`;
|
data['error'] = response.error ?? `No version found with prefix ${ref}.`;
|
||||||
return data['version'];
|
return data['version'];
|
||||||
} else {
|
} 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