Skip to content

Commit 050aafb

Browse files
committed
Ensure cache
1 parent ffa49e7 commit 050aafb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@torchlight-api/torchlight-cli",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "A CLI for Torchlight - the syntax highlighting API",
55
"main": "index.js",
66
"scripts": {

src/cache/file.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ const {
1313
* @constructor
1414
*/
1515
let File = function (options = {}) {
16+
if (!options.directory) {
17+
throw new Error('No cache directory specified.');
18+
}
19+
1620
this.directory = path.resolve(options.directory)
1721

1822
ensureDirSync(this.directory);

0 commit comments

Comments
 (0)