We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 52e3cdf + ed1d581 commit 21322a7Copy full SHA for 21322a7
.envrc
@@ -0,0 +1,17 @@
1
+# config file for `direnv`: https://direnv.net
2
+# load the poetry virtual environment when entering the project directory
3
+
4
+strict_env
5
6
+if [[ ! -f "pyproject.toml" ]]; then
7
+ log_error 'No pyproject.toml found. Use `poetry new` or `poetry init` to create one first.'
8
+ exit 2
9
+fi
10
11
+local VENV="$(poetry env info --path)"
12
+if [[ -z $VENV || ! -d $VENV/bin ]]; then
13
+ log_error 'No poetry virtual environment found. Use `poetry install` to create one first.'
14
15
16
17
+source_env "$VENV/bin/activate"
0 commit comments