From 0319bb210673b8acb2bb7a2f08e6ab26a39f1175 Mon Sep 17 00:00:00 2001 From: Ben Holloway Date: Wed, 29 Aug 2018 14:02:28 +1000 Subject: [PATCH] BREAKING (maybe) remove additional check that decoded source file exists --- lib/process/decode-sources-with.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/process/decode-sources-with.js b/lib/process/decode-sources-with.js index 6ed0cb8..15ea0a9 100644 --- a/lib/process/decode-sources-with.js +++ b/lib/process/decode-sources-with.js @@ -1,7 +1,5 @@ 'use strict'; -var fs = require('fs'); - var getFieldAsFn = require('./get-field-as-fn'); /** @@ -46,11 +44,7 @@ function decodeSourcesWith(codecs, mustDecode) { } // non-string implies error if (typeof decoded !== 'string') { - return getNamedError('Decoder returned a truthy value but it is not a string file path:\n' + decoded); - } - // non-existant file implies error - else if (!fs.existsSync(decoded) || !fs.statSync(decoded).isFile()) { - return getNamedError('Cannot find file at absolute path:\n' + decoded); + return getNamedError('Decoder returned a truthy value but it is not a string:\n' + decoded); } // otherwise success else {