Skip to content

Commit

Permalink
use platform agnostic home dir
Browse files Browse the repository at this point in the history
  • Loading branch information
xavdid committed Jan 28, 2019
1 parent 1cf80ae commit e220926
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions util/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

const fs = require('fs-extra')
const cli = require('heroku-cli-util')
const HOME_DIR = require('os').homedir()

const DEFAULT_FNAME = '.env'
const header = '# this file was created automatically by heroku-config\n\n'
Expand Down Expand Up @@ -142,10 +143,7 @@ module.exports = {
shouldDeleteProd: function*(context, val) {
const path = require('path')

const settingsUrl = path.join(
process.env.HOME,
'.heroku_config_settings.json'
)
const settingsUrl = path.join(HOME_DIR, '.heroku_config_settings.json')

let settings
try {
Expand Down

0 comments on commit e220926

Please sign in to comment.