mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
23 lines
584 B
JavaScript
23 lines
584 B
JavaScript
'use strict';
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
|
|
var osName = _interopDefault(require('os-name'));
|
|
|
|
function getUserAgent() {
|
|
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;
|
|
}
|
|
}
|
|
|
|
exports.getUserAgent = getUserAgent;
|
|
//# sourceMappingURL=index.js.map
|