Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix environment-dependent git pre-commit hooks #10165

Copy link
Copy link
Open
@janosh

Description

@janosh
Issue body actions

This is a follow up to #9948 and vscode#90178. After looking at the problem of environment-dependent pre-commit hooks from both the extension's and the editor's side, it seems to me the best solution would be for the Python extension to make sure that whatever environment the user has selected in the status bar is also active during the commit process (using VS Code's source control panel).

I think this would be the expected behavior by most users if you asked them. At least it took me by surprise that my active environment doesn't apply during the commit process even though it's indicated in the status bar. Hence why it took me a while to figure out this is the reason my pre-commit hooks aren't working.

One way to activate the status bar environment in the spawned git process might be as @joaomoreno mentioned to have a git wrapper that's local to the source control panel (i.e. doesn't affect git anywhere else) and simply activates the environment before handing over to real git.

CompRhys, Huluk, kleinicke, otstrel, waltermaldonado and 284 more

Metadata

Metadata

Assignees

Labels

area-internalLabel for non-user facing issuesLabel for non-user facing issuesfeature-requestRequest for new features or functionalityRequest for new features or functionalityneeds proposalNeed to make some design decisionsNeed to make some design decisions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.