Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tragedy strikes: --no-clean and no temp directory #663

Closed
boneskull opened this issue Sep 5, 2017 · 1 comment
Closed

tragedy strikes: --no-clean and no temp directory #663

boneskull opened this issue Sep 5, 2017 · 1 comment

Comments

@boneskull
Copy link
Contributor

Expected Behavior

use with --no-clean flag doesn't throw if there's no temp dir (typically .nyc_output)

Observed Behavior

Error: ENOENT: no such file or directory, scandir '/Users/boneskull/Documents/projects/mocha/.nyc_output'
    at Object.fs.readdirSync (fs.js:910:18)
    at NYC.loadReports (/Users/boneskull/Documents/projects/mocha/node_modules/nyc/index.js:479:31)
    at NYC._getCoverageMapFromAllCoverageFiles (/Users/boneskull/Documents/projects/mocha/node_modules/nyc/index.js:412:8)
    at NYC.report (/Users/boneskull/Documents/projects/mocha/node_modules/nyc/index.js:421:18)
    at report (/Users/boneskull/Documents/projects/mocha/node_modules/nyc/bin/nyc.js:89:7)
    at /Users/boneskull/Documents/projects/mocha/node_modules/nyc/bin/nyc.js:76:27
    at ChildProcess.<anonymous> (/Users/boneskull/Documents/projects/mocha/node_modules/nyc/node_modules/foreground-child/index.js:52:5)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
make: *** [test-bdd] Error 1                                    

Bonus Points! Code (or Repository) that Reproduces Issue

Well, createTempDirectory() isn't called if clean is falsy.

Forensic Information

macOS; https://gist.github.com/boneskull/fbb28823e66a439f4a7fc735cb883917

@bcoe
Copy link
Member

bcoe commented Sep 6, 2017

@boneskull awesome thanks for the contribution 👍 will work on cutting a new release tonightish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants