Skip to content

Commit

Permalink
escape backslash properly on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mbektas committed Jan 20, 2024
1 parent b0c1d32 commit 28f0d9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/pythonenvdialog/pythonenvdialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ export class ManagePythonEnvironmentDialog {
createCommandPreview.value = \`conda create -p \$\{getEnvInstallPath()\} \$\{getCondaChannels()\}\ \$\{getPackageList()\}\`;
} else {
const envPath = getEnvInstallPath();
createCommandPreview.value = \`python -m venv create \$\{envPath\}\n\$\{envPath\}\$\{pathSeparator\}${activateRelPath}\npython -m pip install \$\{getPackageList()\}\`;
createCommandPreview.value = \`python -m venv create \$\{envPath\}\n\$\{envPath\}\$\{pathSeparator\}${activateRelPath.replace("\\", "\\\\")}\npython -m pip install \$\{getPackageList()\}\`;
}
}
Expand Down

0 comments on commit 28f0d9e

Please sign in to comment.