Skip to content

Commit 38b2729

Browse files
committed
use internal api to read the working directory during image build time
1 parent 90d216b commit 38b2729

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ public void initializeHomeAndPrefixPaths(Env newEnv, String languageHome) {
538538

539539
if (ImageInfo.inImageBuildtimeCode()) {
540540
// use relative paths at buildtime to avoid freezing buildsystem paths
541-
TruffleFile base = newEnv.getCurrentWorkingDirectory();
541+
TruffleFile base = newEnv.getInternalTruffleFile("").getAbsoluteFile();
542542
sysPrefix = base.relativize(newEnv.getInternalTruffleFile(sysPrefix)).getPath();
543543
basePrefix = base.relativize(newEnv.getInternalTruffleFile(basePrefix)).getPath();
544544
coreHome = base.relativize(newEnv.getInternalTruffleFile(coreHome)).getPath();

0 commit comments

Comments
 (0)