mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01:00
Checks whether process.env.HOME exists
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.
This commit is contained in:
parent
484ba9dc25
commit
a0ff6dbc9e
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user