zenity/internal/zenutil/osascripts/file.gojs
2022-06-02 00:00:08 +01:00

17 lines
297 B
Plaintext

{{template "common" .}}
ObjC.import('stdio')
ObjC.import('stdlib')
try {
var res = app.{{.Operation}}({{json .Options}})
} catch (e) {
if (e.errorNumber === -128) $.exit(1)
$.dprintf(2, e)
$.exit(-1)
}
if (Array.isArray(res)) {
res.join({{json .Separator}})
} else {
res.toString()
}