|
| 1 | +diff --git a/lib-commonjs/commands/healthCheck/healthChecks.js b/lib-commonjs/commands/healthCheck/healthChecks.js |
| 2 | +index 885c0a228d061792272e423f0958affeaf9c9299..4acfd4ccf081d50e9c6e08e9225d375500bd76dc 100644 |
| 3 | +--- a/lib-commonjs/commands/healthCheck/healthChecks.js |
| 4 | ++++ b/lib-commonjs/commands/healthCheck/healthChecks.js |
| 5 | +@@ -37,7 +37,6 @@ const pathHelpers = __importStar(require("../../utils/pathHelpers")); |
| 6 | + const execa_1 = __importDefault(require("execa")); |
| 7 | + const find_dotnet_tools_1 = require("@react-native-windows/find-dotnet-tools"); |
| 8 | + const healthCheckList_1 = require("./healthCheckList"); |
| 9 | +-const powershell = (0, find_dotnet_tools_1.findPowerShell)(); |
| 10 | + function getHealthChecks() { |
| 11 | + // #8471: There are known cases where the dependencies script will error out. |
| 12 | + // Fail gracefully if that happens in the meantime. |
| 13 | +@@ -68,6 +67,7 @@ function getHealthChecksUnsafe() { |
| 14 | + if (process.platform !== 'win32') { |
| 15 | + return undefined; |
| 16 | + } |
| 17 | ++ const powershell = (0, find_dotnet_tools_1.findPowerShell)(); |
| 18 | + const rnwDepScriptPath = path_1.default.join(pathHelpers.resolveRnwRoot(process.cwd()), 'Scripts/rnw-dependencies.ps1'); |
| 19 | + return [ |
| 20 | + { |
| 21 | +diff --git a/lib-commonjs/utils/commandWithProgress.js b/lib-commonjs/utils/commandWithProgress.js |
| 22 | +index 0674bea984af02cd0f02ac7959fc017eb94a3619..ffb609527b165771b43e9320dca741cc5df54ae9 100644 |
| 23 | +--- a/lib-commonjs/utils/commandWithProgress.js |
| 24 | ++++ b/lib-commonjs/utils/commandWithProgress.js |
| 25 | +@@ -42,9 +42,9 @@ function newSpinner(text) { |
| 26 | + return (0, ora_1.default)(options).start(); |
| 27 | + } |
| 28 | + exports.newSpinner = newSpinner; |
| 29 | +-const powershell = (0, find_dotnet_tools_1.findPowerShell)(); |
| 30 | + async function runPowerShellScriptFunction(taskDescription, script, funcName, verbose, errorCategory, useAppxCompatibility = false) { |
| 31 | + try { |
| 32 | ++ const powershell = (0, find_dotnet_tools_1.findPowerShell)(); |
| 33 | + const printException = verbose ? '$_;' : ''; |
| 34 | + const importAppx = useAppxCompatibility |
| 35 | + ? 'Import-Module Appx -WarningAction SilentlyContinue; ' |
0 commit comments