Skip to content

Commit 1a53264

Browse files
committed
Use absolute path to .version file.
SCons runs SConscript script with current directory set to build/ when it exists and in root directory when it does not. Issue thezbyg#215.
1 parent 4814407 commit 1a53264

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/gpick.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def GetVersionInfo(self, preferVersionFile):
161161
pass
162162
if not haveVersionInfo:
163163
try:
164-
with open("../.version", "r", encoding = 'utf-8') as version_file:
164+
with open(self.File('#.version').abspath, "r", encoding = 'utf-8') as version_file:
165165
(version, revision, hash, date) = version_file.read().splitlines()
166166
except:
167167
print("Version file \".version\" is required when GIT can not be used to get version information.")

0 commit comments

Comments
 (0)