Skip to content

Commit 8c0b12a

Browse files
tomasstupkatimfel
authored andcommitted
use extraction predicate also in polyglot_app launcher
(cherry picked from commit a19a01e)
1 parent 82fa61b commit 8c0b12a

File tree

1 file changed

+6
-1
lines changed
  • graalpython/lib-graalpython/modules/standalone/templates

1 file changed

+6
-1
lines changed

graalpython/lib-graalpython/modules/standalone/templates/Main.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public class Main {
5757
private static String PYTHON = "python";
5858

5959
public static void main(String[] args) throws IOException {
60-
VirtualFileSystem vfs = new VirtualFileSystem();
60+
VirtualFileSystem vfs = new VirtualFileSystem(p -> {
61+
String s = p.toString();
62+
return s.endsWith(".so") || s.endsWith(".dylib") || s.endsWith(".pyd");
63+
});
6164
Builder builder = Context.newBuilder()
6265
// set true to allow experimental options
6366
.allowExperimentalOptions(true)
@@ -121,6 +124,8 @@ public static void main(String[] args) throws IOException {
121124
} else {
122125
throw e;
123126
}
127+
} finally {
128+
vfs.close();
124129
}
125130
}
126131

0 commit comments

Comments
 (0)