From 2b5bc546bbf3cb12fbc7750cf0874f3a81c20a68 Mon Sep 17 00:00:00 2001 From: mrmlnc Date: Thu, 6 Jun 2019 10:16:39 +0300 Subject: [PATCH] fix(settings): correct default value for `throwErrorOnBrokenSymbolicLink` --- src/settings.spec.ts | 9 --------- src/settings.ts | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/settings.spec.ts b/src/settings.spec.ts index acde8376..0850eb95 100644 --- a/src/settings.spec.ts +++ b/src/settings.spec.ts @@ -55,15 +55,6 @@ describe('Settings', () => { assert.ok(settings.stats); }); - it('should set the "throwErrorOnBrokenSymbolicLink" option to "true" when the "stats" option is enabled', () => { - const settings = new Settings({ - stats: true - }); - - assert.ok(settings.stats); - assert.ok(settings.throwErrorOnBrokenSymbolicLink); - }); - it('should return the `fs` option with custom method', () => { const customReaddirSync = () => []; diff --git a/src/settings.ts b/src/settings.ts index f7022cd1..a2953d0f 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -123,7 +123,7 @@ export default class Settings { public readonly onlyFiles: boolean = this._getValue(this._options.onlyFiles, true); public readonly stats: boolean = this._getValue(this._options.stats, false); public readonly suppressErrors: boolean = this._getValue(this._options.suppressErrors, false); - public readonly throwErrorOnBrokenSymbolicLink: boolean = this.stats && this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); + public readonly throwErrorOnBrokenSymbolicLink: boolean = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); public readonly unique: boolean = this._getValue(this._options.unique, true); constructor(private readonly _options: Options = {}) {