setup-node/node_modules/universal-user-agent/index.js
Danny McCormick 5273d0df9c Add auth
2019-08-06 18:29:44 -04:00

15 lines
338 B
JavaScript

module.exports = getUserAgentNode
const osName = require('os-name')
function getUserAgentNode () {
try {
return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`
} catch (error) {
if (/wmic os get Caption/.test(error.message)) {
return 'Windows <version undetectable>'
}
throw error
}
}