()
| 47 | } |
| 48 | |
| 49 | public async install(): Promise<InstallResult> { |
| 50 | if (Utils.isHostedAgent(this.moduleRoot)) { |
| 51 | await this.tryInstallingLatest(); |
| 52 | await this.tryInstallFromFolder(); |
| 53 | await this.tryInstallFromZip(); |
| 54 | await this.tryInstallFromGHRelease(); |
| 55 | await this.tryInstallFromPSGallery(); |
| 56 | } else { |
| 57 | core.debug("File layout is not like hosted agent, skippig module install."); |
| 58 | this.installResult = { |
| 59 | isInstalled: false, |
| 60 | moduleSource: AzModuleSource.PrivateAgent |
| 61 | }; |
| 62 | } |
| 63 | |
| 64 | return this.installResult; |
| 65 | } |
| 66 | |
| 67 | private async tryInstallingLatest() { |
| 68 | if (this.installResult.isInstalled) { |
no test coverage detected