added review comments

This commit is contained in:
Akshaya M
2020-03-16 17:07:31 +05:30
parent 7fc98cfa3d
commit c909df3338
6 changed files with 16 additions and 16 deletions

View File

@@ -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 = "";