Skip to content
Myr

Constants don't exist in process. The same problem is reported following link https://github.com/senchalabs/connect/issues/closed#issue/119

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by shuwatto · committed by Tj Holowaychuk · parent fd2f67b · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:bin/express+3 added-2 removed
4 unmodified lines
5 */67var fs = require('fs')8 , sys = require('sys')9 , exec = require('child_process').exec;9 , exec = require('child_process').exec10 , constants = require('constants');1112/**13 * Framework version.14 */
345 unmodified lines
360 */361362function emptyDirectory(path, fn) {363 fs.readdir(path, function(err, files){363 if (err && err.errno !== process.ENOENT) throw err;364 if (err && err.errno !== constants.ENOENT) throw err;365 fn(!files || !files.length);366 });367}368
67 unmodified lines