Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for detecting $VIRTUAL_ENV #181

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pantheraleo-7
Copy link

@pantheraleo-7 pantheraleo-7 commented Dec 15, 2024

Addresses #180

(this is me writing rust for the first time 😬)

@pantheraleo-7
Copy link
Author

@microsoft-github-policy-service agree

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This pull request adds support for detecting and including the “VIRTUAL_ENV” environment variable path when listing global virtual environment directories.

  • Introduces a new parameter (virtual_env_env_var) to the list_global_virtual_envs_paths function.
  • Checks and appends the detected path for “VIRTUAL_ENV” if it exists.
  • Calls the updated function in find.rs to pass environment.get_env_var("VIRTUAL_ENV").

Changes

File Description
crates/pet-global-virtualenvs/src/lib.rs Adds a new optional parameter to handle the “VIRTUAL_ENV” variable
crates/pet/src/find.rs Passes the “VIRTUAL_ENV” environment variable to the updated function

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

@@ -56,11 +56,20 @@ fn get_global_virtualenv_dirs(
}

pub fn list_global_virtual_envs_paths(
virtual_env_env_var: Option<String>,
Copy link
Preview

Copilot AI Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a documentation comment explaining how this new parameter is used for capturing $VIRTUAL_ENV. This helps future maintainers understand its purpose.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant