mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[jsscripting] Tell the script context to use the classloader of the current class. (#11400)
Fixes #11222 Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This commit is contained in:
parent
6a33a3fd27
commit
cb9b69943c
@ -70,6 +70,7 @@ public class OpenhabGraalJSScriptEngine extends InvocationInterceptingScriptEngi
|
||||
.option("js.commonjs-require-cwd", MODULE_DIR).option("js.nashorn-compat", "true") // to ease
|
||||
// migration
|
||||
.option("js.commonjs-require", "true") // enable CommonJS module support
|
||||
.hostClassLoader(getClass().getClassLoader())
|
||||
.fileSystem(new DelegatingFileSystem(FileSystems.getDefault().provider()) {
|
||||
@Override
|
||||
public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options,
|
||||
|
Loading…
Reference in New Issue
Block a user