Skip to content

Commit

Permalink
Change persist storage directory
Browse files Browse the repository at this point in the history
  • Loading branch information
lprhodes committed Apr 27, 2017
1 parent b576baf commit 6a698c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 6 additions & 1 deletion helpers/persistentState.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
const path = require('path');
const nodePersist = require('node-persist');
nodePersist.initSync();

var home = process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE;
home = path.join(home, ".homebridge");

nodePersist.initSync({ dir: `${home}/plugin-persist/homebridge-broadlink-rm` });

const clear = ({ host, name }) => {
if (!host) host = 'default';
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "homebridge-broadlink-rm",
"version": "2.0.13",
"version": "2.0.14",
"description": "Broadlink RM plugin (including the mini and pro) for homebridge: https://github.com/nfarina/homebridge",
"license": "ISC",
"keywords": [
Expand All @@ -22,6 +22,7 @@
},
"dependencies": {
"broadlinkjs": "git+https://github.com/lprhodes/broadlinkjs.git#4a90e87",
"node-persist": "^2.0.10"
"node-persist": "^2.0.10",
"semver": "^5.3.0"
}
}

0 comments on commit 6a698c9

Please sign in to comment.