Skip to content

Commit

Permalink
Ensure cache
Browse files Browse the repository at this point in the history
  • Loading branch information
aarondfrancis committed Aug 19, 2021
1 parent ffa49e7 commit 050aafb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 4 additions & 0 deletions src/cache/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 050aafb

Please sign in to comment.