Skip to content

Commit

Permalink
fixes #10240 (#10269)
Browse files Browse the repository at this point in the history
* kochdocs.nim: code cleanup

* fixes #10420
  • Loading branch information
Araq committed Jan 11, 2019
1 parent ceabbea commit d1b7aa2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 4 additions & 2 deletions compiler/scriptconfig.nim
Expand Up @@ -63,8 +63,10 @@ proc setupVM*(module: PSym; cache: IdentCache; scriptName: string;
os.removeFile getString(a, 0)
cbos createDir:
os.createDir getString(a, 0)
cbos getOsError:
setResult(a, errorMsg)

result.registerCallback "stdlib.system.getOsError",
proc (a: VmArgs) = setResult(a, errorMsg)

cbos setCurrentDir:
os.setCurrentDir getString(a, 0)
cbos getCurrentDir:
Expand Down
6 changes: 1 addition & 5 deletions tools/kochdocs.nim
Expand Up @@ -56,12 +56,8 @@ proc nimexec*(cmd: string) =
exec findNim() & " " & cmd

proc nimCompile*(input: string, outputDir = "bin", mode = "c", options = "") =
# TODO: simplify pending https://github.com/nim-lang/Nim/issues/9513
var cmd = findNim() & " " & mode
let output = outputDir / input.splitFile.name.exe
cmd.add " -o:" & output
cmd.add " " & options
cmd.add " " & input
let cmd = findNim() & " " & mode & " -o:" & output & " " & options & " " & input
exec cmd

const
Expand Down

0 comments on commit d1b7aa2

Please sign in to comment.