Skip to content

Commit 09ec3fa

Browse files
committed
changes in setmodulepath
1 parent 04bdab0 commit 09ec3fa

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

lib/PowerShell/Utilities/Utils.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,17 @@ class Utils {
5050
}
5151
static setPSModulePath(azPSVersion = "") {
5252
let modulePath = "";
53-
const RUNNER = process.env.RUNNER_OS || os.type();
54-
switch (RUNNER) {
55-
case "Linux":
53+
const runner = process.env.RUNNER_OS || os.type();
54+
switch (runner.toLowerCase()) {
55+
case "linux":
5656
modulePath = `/usr/share/${azPSVersion}:`;
5757
break;
58-
case "Windows":
59-
case "Windows_NT":
58+
case "windows":
59+
case "windows_nt":
6060
modulePath = `C:\\Modules\\${azPSVersion};`;
6161
break;
62-
case "macOS":
63-
case "Darwin":
62+
case "macos":
63+
case "darwin":
6464
// TODO: add modulepath
6565
break;
6666
default:

src/PowerShell/Utilities/Utils.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ export default class Utils {
3333

3434
static setPSModulePath(azPSVersion: string = "") {
3535
let modulePath: string = "";
36-
const RUNNER: string = process.env.RUNNER_OS || os.type();
37-
switch (RUNNER) {
38-
case "Linux":
36+
const runner: string = process.env.RUNNER_OS || os.type();
37+
switch (runner.toLowerCase()) {
38+
case "linux":
3939
modulePath = `/usr/share/${azPSVersion}:`;
4040
break;
41-
case "Windows":
42-
case "Windows_NT":
41+
case "windows":
42+
case "windows_nt":
4343
modulePath = `C:\\Modules\\${azPSVersion};`;
4444
break;
45-
case "macOS":
46-
case "Darwin":
45+
case "macos":
46+
case "darwin":
4747
// TODO: add modulepath
4848
break;
4949
default:

0 commit comments

Comments
 (0)