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

Method tryInstallFromZip

lib/index.js:7771–7787  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7769 });
7770 }
7771 tryInstallFromZip() {
7772 return __awaiter(this, void 0, void 0, function* () {
7773 if (this.installResult.isInstalled) {
7774 core.debug(`Module already installed skipping tryInstallFromZip`);
7775 return;
7776 }
7777 if (FileUtils_1.default.pathExists(this.moduleZipPath)) {
7778 core.debug(`Az ${this.version} present at ${this.moduleZipPath} as zip, expanding it.`);
7779 yield new ArchiveTools_1.ArchiveTools(this.isWin).unzip(this.moduleZipPath, this.moduleRoot);
7780 yield FileUtils_1.default.deleteFile(this.moduleZipPath);
7781 this.installResult = {
7782 isInstalled: true,
7783 moduleSource: exports.AzModuleSource.Zip
7784 };
7785 }
7786 });
7787 }
7788 tryInstallFromGHRelease() {
7789 return __awaiter(this, void 0, void 0, function* () {
7790 if (this.installResult.isInstalled) {

Callers 1

installMethod · 0.95

Calls 3

pathExistsMethod · 0.45
unzipMethod · 0.45
deleteFileMethod · 0.45

Tested by

no test coverage detected