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

Method importAzModule

lib/index.js:7919–7931  ·  view source on GitHub ↗
(azPSVersion)

Source from the content-addressed store, hash-verified

7917const Constants_1 = __importDefault(__nccwpck_require__(5002));
7918class InitializeAzure {
7919 static importAzModule(azPSVersion) {
7920 return __awaiter(this, void 0, void 0, function* () {
7921 yield Utils_1.default.setPSModulePath();
7922 if (azPSVersion === "latest") {
7923 azPSVersion = yield Utils_1.default.getLatestModule(Constants_1.default.moduleName);
7924 }
7925 else {
7926 yield Utils_1.default.checkModuleVersion(Constants_1.default.moduleName, azPSVersion);
7927 }
7928 core.debug(`Az Module version used: ${azPSVersion}`);
7929 yield Utils_1.default.setPSModulePath(`${Constants_1.default.prefix}${azPSVersion}`);
7930 });
7931 }
7932}
7933exports["default"] = InitializeAzure;
7934

Callers 2

mainFunction · 0.45

Calls 3

setPSModulePathMethod · 0.45
getLatestModuleMethod · 0.45
checkModuleVersionMethod · 0.45

Tested by

no test coverage detected