Set the setup-php user agent for tool downloads and Node fetches

This commit is contained in:
Shivam Mathur
2026-11-27 01:39:28 +05:30
parent 66f29b02f3
commit fad0ff9c5d
6 changed files with 18 additions and 7 deletions
+4
View File
@@ -21,6 +21,10 @@ it('checking fetch', async () => {
nock(host_url)
.get('/manifest')
.matchHeader(
'user-agent',
`setup-php (${process.platform}; ${process.arch}; +https://setup-php.com)`
)
.reply(200, {latest: 'latest'})
.get('/manifest')
.matchHeader('authorization', 'Bearer invalid_token')