Skip to content

Running a workspace file in the terminal after having run a file from outside the workspace doesn't update the terminal directory #6705

@kimadeline

Description

@kimadeline

Uncovered when validating #1062

Environment data

  • VS Code version: 1.36.1
  • Extension version (available under the Extensions sidebar): master commit 2148e61
  • OS and version: macOS 10.14.5
  • Python version (& distribution if applicable, e.g. Anaconda): 3.73
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venvv
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): Jedi

Expected behaviour

The directory in the terminal should reflect the path of the file being run.

Actual behaviour

When running a workspace Python file in the terminal after having run a Python file from outside the workspace, the directory in the terminal isn't updated to the workspace directory.

Steps to reproduce:

  1. Set python.terminal.executeInFileDir to true
  2. Open a workspace, and open a python file not in the workspace
  3. Right-click > "Run Python File in Terminal" for the file outside the workspace, notice that the directory in the terminal is updated
  4. Right-click > "Run Python File in Terminal" for a file inside the workspace, notice that the directory in the terminal doesn't update to the workspace directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-terminalbugIssue identified by VS Code Team member as probable bugverification-neededVerification of issue is requestedverifiedVerification succeeded

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions