Skip to content

Commit

Permalink
Fix for pwsh users
Browse files Browse the repository at this point in the history
  • Loading branch information
radurentea committed Aug 12, 2024
1 parent 81dea08 commit 4a66423
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/espIdf/monitor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export class IDFMonitor {

// Function to quote paths for PowerShell and correctly handle spaces for Bash
const quotePath = (path) => {
if (shellType.includes("powershell")) {
if (shellType.includes("powershell") || shellType.includes("pwsh")) {
return `'${path.replace(/'/g, "''")}'`;
} else if (shellType.includes("cmd")) {
return `"${path}"`;
Expand Down Expand Up @@ -113,7 +113,7 @@ export class IDFMonitor {
const envSetCmd = process.platform === "win32" ? "set" : "export";
const quotedIdfPath = quotePath(modifiedEnv.IDF_PATH);

if (shellType.includes("powershell")) {
if (shellType.includes("powershell") || shellType.includes("pwsh")) {
this.terminal.sendText(`& ${envSetCmd} IDF_PATH=${quotedIdfPath}`);
this.terminal.sendText(`& ${args.join(" ")}`);
} else if (shellType.includes("cmd")) {
Expand Down

0 comments on commit 4a66423

Please sign in to comment.