Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ab7c322

Browse filesBrowse files
committed
fix(externals): init external in dev mode only
Previously it would always adjust your system path, which is bad behaviour.
1 parent 1fd07a0 commit ab7c322
Copy full SHA for ab7c322

1 file changed

+2-1Lines changed: 2 additions & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/__init__.py‎

Copy file name to clipboardExpand all lines: git/__init__.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
#{ Initialization
1616
def _init_externals():
1717
"""Initialize external projects by putting them into the path"""
18-
sys.path.append(os.path.join(os.path.dirname(__file__), 'ext', 'gitdb'))
18+
if __version__ == 'git':
19+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'ext', 'gitdb'))
1920

2021
try:
2122
import gitdb

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.