diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bc8b7a..768bbff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,16 @@ +1.1.1 / 2017-02-05 +------------------ + +- changed handling error to throw the exception + 1.1.0 / 2017-01-25 ------------------ + - switched from [multimatch](https://github.com/sindresorhus/multimatch) to [micromatch](https://github.com/jonschlinkert/micromatch) for matching ignore patterns (showed faster performance) - bug fixed: normalize root directory to make sure always return absolute paths. 1.0.2 / 2017-01-17 ------------------ + - initial release diff --git a/klaw-sync.js b/klaw-sync.js index d636f0b..28a968f 100644 --- a/klaw-sync.js +++ b/klaw-sync.js @@ -43,7 +43,7 @@ function walkSync (dir, opts, list) { ignore = mm(files, opts.ignore) } } catch (er) { - return er + throw er } files.forEach(function (file) { if (ignore.length > 0) { diff --git a/test/test.js b/test/test.js index 26fb2b6..211f1ac 100644 --- a/test/test.js +++ b/test/test.js @@ -42,7 +42,6 @@ describe('klaw-sync', function () { klawSync('dirDoesNotExist/') } catch (err) { assert.equal(err.code, 'ENOENT') - } finally { done() } }) @@ -52,7 +51,6 @@ describe('klaw-sync', function () { klawSync(FILES[0]) } catch (err) { assert.equal(err.code, 'ENOTDIR') - } finally { done() } })