diff --git a/package.json b/package.json index c7233e1..c84153e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@torchlight-api/torchlight-cli", - "version": "0.0.4", + "version": "0.0.5", "description": "A CLI for Torchlight - the syntax highlighting API", "main": "index.js", "scripts": { diff --git a/src/cache/file.js b/src/cache/file.js index 4a9f0fa..784d4f4 100644 --- a/src/cache/file.js +++ b/src/cache/file.js @@ -13,6 +13,10 @@ const { * @constructor */ let File = function (options = {}) { + if (!options.directory) { + throw new Error('No cache directory specified.'); + } + this.directory = path.resolve(options.directory) ensureDirSync(this.directory);