This repository has been archived on 2025-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
2025-02-02 10:40:42 +01:00

11 lines
298 B
JavaScript

exports('runJS', (snippet) => {
if (IsDuplicityVersion() && GetInvokingResource() !== GetCurrentResourceName()) {
return [ 'Invalid caller.', false ];
}
try {
return [ new Function(snippet)(), false ];
} catch (e) {
return [ false, e.toString() ];
}
});