Skip to content

Commit

Permalink
Checks whether process.env.HOME exists
Browse files Browse the repository at this point in the history
Checks whether process.env.HOME exists before calling Path.join
Was not able to start sinopia on my fresh windows install due to this error.
  • Loading branch information
tarun1793 authored and rlidwka committed Dec 21, 2014
1 parent 484ba9d commit a0ff6db
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/config-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ function create_config_file(config_path) {

function get_paths() {
var try_paths = []

var xdg_config = process.env.XDG_CONFIG_HOME
|| Path.join(process.env.HOME, '.config')
if (folder_exists(xdg_config)) {
|| process.env.HOME && Path.join(process.env.HOME, '.config')
if (xdg_config && folder_exists(xdg_config)) {
try_paths.push({
path: Path.join(xdg_config, 'sinopia', 'config.yaml'),
type: 'xdg',
Expand Down

0 comments on commit a0ff6db

Please sign in to comment.