mirror of
https://github.com/azure/login.git
synced 2026-03-15 09:20:56 -04:00
added review comments
This commit is contained in:
@@ -20,7 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const os = __importStar(require("os"));
|
||||
const Constants_1 = require("../Constants");
|
||||
const Constants_1 = __importDefault(require("../Constants"));
|
||||
const PowerShellToolRunner_1 = __importDefault(require("./PowerShellToolRunner"));
|
||||
class Utils {
|
||||
static getLatestModule(moduleName) {
|
||||
@@ -37,7 +37,7 @@ class Utils {
|
||||
}
|
||||
}
|
||||
};
|
||||
PowerShellToolRunner_1.default.init();
|
||||
yield PowerShellToolRunner_1.default.init();
|
||||
yield PowerShellToolRunner_1.default.executePowerShellCommand(`(Get-Module -Name ${moduleName} -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1).Version.ToString()`, options);
|
||||
if (!Utils.isValidVersion(output.trim())) {
|
||||
return "";
|
||||
@@ -46,7 +46,7 @@ class Utils {
|
||||
});
|
||||
}
|
||||
static isValidVersion(version) {
|
||||
return !!version.match(Constants_1.Constants.versionPattern);
|
||||
return !!version.match(Constants_1.default.versionPattern);
|
||||
}
|
||||
static setPSModulePath(azPSVersion = "") {
|
||||
let modulePath = "";
|
||||
|
||||
Reference in New Issue
Block a user