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 23, 2024
1 parent 2061a97 commit 6376dcc
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 6376dcc

Please sign in to comment.