This commit is contained in:
Andreas Rumpf 2021-06-03 20:55:41 +02:00 • committed by GitHub
commit 28f2abe1a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,7 +20,7 @@ import
from uri import encodeUrl from uri import encodeUrl
from std/private/globs import nativeToUnixPath from std/private/globs import nativeToUnixPath
from nodejs import findNodeJs
const const
exportSection = skField exportSection = skField
@ -430,7 +430,9 @@ proc runAllExamples(d: PDoc) =
"rdoccmd", group.rdoccmd, "rdoccmd", group.rdoccmd,
"docCmd", group.docCmd, "docCmd", group.docCmd,
] ]
if os.execShellCmd(cmd) != 0: if d.conf.backend == backendJs and findNodeJs() == "":
discard "ignore JS runnableExample"
elif os.execShellCmd(cmd) != 0:
d.conf.quitOrRaise "[runnableExamples] failed: generated file: '$1' group: '$2' cmd: $3" % [outp.string, group[].prettyString, cmd] d.conf.quitOrRaise "[runnableExamples] failed: generated file: '$1' group: '$2' cmd: $3" % [outp.string, group[].prettyString, cmd]
else: else:
# keep generated source file `outp` to allow inspection. # keep generated source file `outp` to allow inspection.