Cross platform home directory

This commit is contained in:
Juan Cruz Viotti 2014-12-03 09:31:36 -04:00
parent 4143b6da49
commit 1b8290ade1
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
_ = require('lodash')
path = require('path')
userHome = require('user-home')
config =
@ -7,9 +8,8 @@ config =
remoteUrl: 'https://staging.resin.io'
apiPrefix: '/ewa/'
# TODO: Check if not running on UNIX environment
# and add a custom path accordingly
dataPrefix: path.join(process.env.HOME, '.resin')
dataPrefix: path.join(userHome, '.resin')
sshKeyWidth: 43
directories:

View File

@ -54,6 +54,7 @@
"pubnub": "~3.7.0",
"request-progress": "~0.3.1",
"progress-bar": "~0.1.1",
"progress": "~1.1.8"
"progress": "~1.1.8",
"user-home": "~1.1.0"
}
}