(moduleContainerPath)
| 8539 | return !!version.match(Constants_1.default.versionPattern); |
| 8540 | } |
| 8541 | static isHostedAgent(moduleContainerPath) { |
| 8542 | return __awaiter(this, void 0, void 0, function* () { |
| 8543 | const script = `Test-Path (Join-Path "${moduleContainerPath}" "az_*")`; |
| 8544 | let output = ""; |
| 8545 | const options = { |
| 8546 | listeners: { |
| 8547 | stdout: (data) => { |
| 8548 | output += data.toString(); |
| 8549 | } |
| 8550 | } |
| 8551 | }; |
| 8552 | yield PowerShellToolRunner_1.default.executePowerShellCommand(script, options); |
| 8553 | return output.trim().toLowerCase() === "true"; |
| 8554 | }); |
| 8555 | } |
| 8556 | static isGhes() { |
| 8557 | const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); |
| 8558 | return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM'; |
no test coverage detected