Skip to content

Commit

Permalink
[Workbox-Build] Raise an error when an unusual error is encountered …
Browse files Browse the repository at this point in the history
…when attempting to read a directory and follow symlinked directories when expanding ** patterns
  • Loading branch information
beatrizdemiguelperez committed Dec 4, 2017
1 parent b3ddc9b commit 9a7db79
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/workbox-build/src/lib/get-file-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,22 @@ const errors = require('./errors');
const getFileSize = require('./get-file-size');
const getFileHash = require('./get-file-hash');

module.exports = ({globDirectory, globIgnores, globPattern}) => {
module.exports = (globOptions) => {
const {
globDirectory,
globIgnores,
globPattern,
globFollows,
globStrict,
} = globOptions;
let globbedFiles;
try {
globbedFiles = glob.sync(globPattern, {
cwd: globDirectory,
ignore: globIgnores,
follow: typeof globFollows !== 'undefined'? globFollows : true,
strict: typeof globStrict !== 'undefined'? globStrict : true,

});
} catch (err) {
throw new Error(errors['unable-to-glob-files'] + ` '${err.message}'`);
Expand Down

0 comments on commit 9a7db79

Please sign in to comment.