Skip to content

Commit f3d6c4d

Browse files
author
Kartik Raj
authored
Trim the contents of pipenv dot project file after reading it (#18747)
* Trim the contents of pipenv dot project file after reading it * Update tests
1 parent 428d2d2 commit f3d6c4d

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

  • src
    • client/pythonEnvironments/common/environmentManagers
    • test/pythonEnvironments/common/envlayouts
      • pipenv/globalEnvironments/project2-vnNIWe9P
      • virtualhome/.local/share/virtualenvs/project2-vnNIWe9P

src/client/pythonEnvironments/common/environmentManagers/pipenv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ async function getProjectDir(envFolder: string): Promise<string | undefined> {
8383
if (!(await pathExists(dotProjectFile))) {
8484
return undefined;
8585
}
86-
const projectDir = await readFile(dotProjectFile);
86+
const projectDir = (await readFile(dotProjectFile)).trim();
8787
if (!(await pathExists(projectDir))) {
8888
traceError(
8989
`The .project file inside environment folder: ${envFolder} doesn't contain a valid path to the project`,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Absolute path to \src\test\pythonEnvironments\common\envlayouts\pipenv\project2
1+
Absolute path to \src\test\pythonEnvironments\common\envlayouts\pipenv\project2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Absolute path to \src\test\pythonEnvironments\common\envlayouts\pipenv\project2
1+
Absolute path to \src\test\pythonEnvironments\common\envlayouts\pipenv\project2

0 commit comments

Comments
 (0)