(version, modulePath)
| 8558 | return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM'; |
| 8559 | } |
| 8560 | static saveAzModule(version, modulePath) { |
| 8561 | return __awaiter(this, void 0, void 0, function* () { |
| 8562 | const script = ` |
| 8563 | $prevProgressPref = $ProgressPreference |
| 8564 | $ProgressPreference = 'SilentlyContinue' |
| 8565 | Save-Module -Path ${modulePath} -Name Az -RequiredVersion ${version} -Force -ErrorAction Stop |
| 8566 | $ProgressPreference = $prevProgressPref`; |
| 8567 | const exitCode = yield PowerShellToolRunner_1.default.executePowerShellScriptBlock(script); |
| 8568 | if (exitCode != 0) { |
| 8569 | throw new Error(`Download from PSGallery failed for Az ${version} to ${modulePath}`); |
| 8570 | } |
| 8571 | }); |
| 8572 | } |
| 8573 | } |
| 8574 | exports["default"] = Utils; |
| 8575 |
no test coverage detected