Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
9050ed34
Unverified
Commit
9050ed34
authored
May 21, 2020
by
R Max Espinoza
Committed by
GitHub
May 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pipenv: fix error when Pipfile is not a file (#8931)
parent
cfdd3c8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
pipenv.plugin.zsh
plugins/pipenv/pipenv.plugin.zsh
+2
-2
No files found.
plugins/pipenv/pipenv.plugin.zsh
View file @
9050ed34
...
@@ -7,7 +7,7 @@ compdef _pipenv pipenv
...
@@ -7,7 +7,7 @@ compdef _pipenv pipenv
# Automatic pipenv shell activation/deactivation
# Automatic pipenv shell activation/deactivation
_togglePipenvShell
()
{
_togglePipenvShell
()
{
# deactivate shell if Pipfile doesn't exist and not in a subdir
# 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
[[
"
$PIPENV_ACTIVE
"
==
1
]]
;
then
if
[[
"
$PWD
"
!=
"
$pipfile_dir
"
*
]]
;
then
if
[[
"
$PWD
"
!=
"
$pipfile_dir
"
*
]]
;
then
exit
exit
...
@@ -17,7 +17,7 @@ _togglePipenvShell() {
...
@@ -17,7 +17,7 @@ _togglePipenvShell() {
# activate the shell if Pipfile exists
# activate the shell if Pipfile exists
if
[[
"
$PIPENV_ACTIVE
"
!=
1
]]
;
then
if
[[
"
$PIPENV_ACTIVE
"
!=
1
]]
;
then
if
[[
-
a
"
$PWD
/Pipfile"
]]
;
then
if
[[
-
f
"
$PWD
/Pipfile"
]]
;
then
export
pipfile_dir
=
"
$PWD
"
export
pipfile_dir
=
"
$PWD
"
pipenv shell
pipenv shell
fi
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