MCPcopy Create free account
hub / github.com/Azure/powershell / install

Method install

lib/index.js:7722–7740  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7720 this.moduleZipPath = `${this.modulePath}.zip`;
7721 }
7722 install() {
7723 return __awaiter(this, void 0, void 0, function* () {
7724 if (Utils_1.default.isHostedAgent(this.moduleRoot)) {
7725 yield this.tryInstallingLatest();
7726 yield this.tryInstallFromFolder();
7727 yield this.tryInstallFromZip();
7728 yield this.tryInstallFromGHRelease();
7729 yield this.tryInstallFromPSGallery();
7730 }
7731 else {
7732 core.debug("File layout is not like hosted agent, skippig module install.");
7733 this.installResult = {
7734 isInstalled: false,
7735 moduleSource: exports.AzModuleSource.PrivateAgent
7736 };
7737 }
7738 return this.installResult;
7739 });
7740 }
7741 tryInstallingLatest() {
7742 return __awaiter(this, void 0, void 0, function* () {
7743 if (this.installResult.isInstalled) {

Callers 2

mainFunction · 0.45

Calls 6

tryInstallingLatestMethod · 0.95
tryInstallFromFolderMethod · 0.95
tryInstallFromZipMethod · 0.95
isHostedAgentMethod · 0.45

Tested by

no test coverage detected