Replies: 2 comments 10 replies
-
Can you try that to confirm? |
Beta Was this translation helpful? Give feedback.
0 replies
-
Makes sense, thank you. |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've encountered an unexpected behavior with
hatch run
(1.10.0) on MacOS X (Sonoma 14.4 on arm).I've created a
docs
environment for sphinx, following the hatch configuration from Jupyter notebook. When I enter the shell, the environment script (activate) gets properly sourced and thePATH
gets correctly set.Likewise, when I exit the environment and use
hatch -e docs run
, I get the correct python path.But other scripts, which are also available on my system, point outside of the virtualenv.
(I expect this to output
/Users/jlorieau/Code/python/xamin/xamin/.hatch/docs/bin/sphinx-build
).It appears that the virtual environment hasn't prepended the virtual environment
PATH
when usinghatch -e docs run echo $PATH
.I haven't read through the hatch source, but I'm guessing that
hatch run
doesn't source the environment (in my case,source .hatch/docs/bin/activate
) to properly prepend thePATH
.Presumably, Jupyter notebook hasn't encountered this problem when running their script command:
hatch run docs:build
. I believe that I'm missing a configuration setting or something--is that the case?Nevertheless, this might be a bug or an unsupported feature I could not find in the documentation.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions