davglass/yuidocjs — Issue #17: If output directory already exists, an error occurs
Author: nzakas
Created: 2011-12-26 17:02:24+00:00
State: open

If I specify an output directory that already exists, an error occurs:

```

Buildfile: /home/nicholas/share/personal/buildr/build.xml

document:
[echo] Documenting with yuidoc Toolkit
[exec] info: (yuidoc): Starting YUIDoc@0.2.5 using YUI@3.5.0pr1 with NodeJS@0.4.10
[exec] info: (yuidoc): Scanning for yuidoc.json file.
[exec] info: (yuidoc): Starting YUIDoc with the following options:
[exec] info: (yuidoc):
[exec] { paths: [ '/home/nicholas/share/personal/buildr/tmp' ],
[exec] outdir: '/home/nicholas/share/personal/buildr/docs' }
[exec] info: (yuidoc): YUIDoc Starting from: /home/nicholas/share/personal/buildr/tmp
[exec] warn: (yuidoc): Making out dir: /home/nicholas/share/personal/buildr/docs
[exec]
[exec] node.js:134
[exec] throw e; // process.nextTick error, or 'error' event on first tick
[exec] ^
[exec] Error: EEXIST, File exists '/home/nicholas/share/personal/buildr/docs'
[exec] at Object.mkdirSync (fs.js:360:18)
[exec] at Object.writeJSON (/usr/local/lib/node_modules/yuidocjs/lib/yuidoc.js:239:24)
[exec] at Object.run (/usr/local/lib/node_modules/yuidocjs/lib/yuidoc.js:275:29)
[exec] at Object. (/usr/local/lib
[exec] /node_modules/yuidocjs/lib/cli.js:139:36)
[exec] at Module._compile (module.js:402:26)
[exec] at Object..js (module.js:408:10)
[exec] at Module.load (module.js:334:31)
[exec] at Function._load (module.js:293:12)
[exec] at Array. (module.js:421:10)
[exec] at EventEmitter._tickCallback (node.js:126:26)
```