Skip to content

fix: exit Makefile gracefully if an inactive venv was found#345

Merged
jenstroeger merged 2 commits intostagingfrom
fix-inactive-venv
Oct 28, 2022
Merged

fix: exit Makefile gracefully if an inactive venv was found#345
jenstroeger merged 2 commits intostagingfrom
fix-inactive-venv

Conversation

@jenstroeger
Copy link
Copy Markdown
Owner

It might happen that a user runs

(project) ~/some/path > deactivate
~/some/path > make venv

in which case we want to exit gracefully instead of installing a new venv over the existing one.

@jenstroeger jenstroeger requested a review from behnazh October 18, 2022 05:02
Comment thread Makefile Outdated
echo "Found an activated Python virtual environment, exiting" && exit 1; \
fi
if [ -d .venv/ ]; then \
echo "Found an inactive Python virtual environment, please activate" && exit 1; \
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It might be good to ask to "Remove it otherwise."?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

You mean as part of the echo?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Commit c183f13.

@jenstroeger jenstroeger requested a review from behnazh October 28, 2022 03:17
@jenstroeger jenstroeger merged commit 01477d7 into staging Oct 28, 2022
@jenstroeger jenstroeger deleted the fix-inactive-venv branch October 30, 2022 05:54
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.

2 participants