Skip to content

Commit e7728c3

Browse files
committed
Calculate the version from the module, not the entry_point
When git-filter-repo is installed, sys.argv[0] will be an entry-point stub, not the relevant Python module. Signed-off-by: Stefano Rivera <[email protected]>
1 parent c5af37f commit e7728c3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-filter-repo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1597,7 +1597,7 @@ class GitUtils(object):
15971597

15981598
@staticmethod
15991599
def print_my_version():
1600-
with open(sys.argv[0], 'br') as f:
1600+
with open(__file__, 'br') as f:
16011601
contents = f.read()
16021602
# If people replaced @@LOCALEDIR@@ string to point at their local
16031603
# directory, undo it so we can get original source version.

0 commit comments

Comments
 (0)