Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
9050ed34
Unverified
Commit
9050ed34
authored
May 21, 2020
by
R Max Espinoza
Committed by
GitHub
May 21, 2020
Browse files
pipenv: fix error when Pipfile is not a file (#8931)
parent
cfdd3c8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/pipenv/pipenv.plugin.zsh
View file @
9050ed34
...
...
@@ -7,7 +7,7 @@ compdef _pipenv pipenv
# Automatic pipenv shell activation/deactivation
_togglePipenvShell
()
{
# deactivate shell if Pipfile doesn't exist and not in a subdir
if
[[
!
-
a
"
$PWD
/Pipfile"
]]
;
then
if
[[
!
-
f
"
$PWD
/Pipfile"
]]
;
then
if
[[
"
$PIPENV_ACTIVE
"
==
1
]]
;
then
if
[[
"
$PWD
"
!=
"
$pipfile_dir
"
*
]]
;
then
exit
...
...
@@ -17,7 +17,7 @@ _togglePipenvShell() {
# activate the shell if Pipfile exists
if
[[
"
$PIPENV_ACTIVE
"
!=
1
]]
;
then
if
[[
-
a
"
$PWD
/Pipfile"
]]
;
then
if
[[
-
f
"
$PWD
/Pipfile"
]]
;
then
export
pipfile_dir
=
"
$PWD
"
pipenv shell
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment