Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
fix: file not found bug
Browse files Browse the repository at this point in the history
  • Loading branch information
beetcb committed Jan 18, 2021
1 parent 4b1d03e commit 6938218
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions init.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ class User {
loadUserFormFile(path) {
let users = this.conf.get('users') || []
let loadedUsers
try {
if (fs.existsSync(path)) {
const doc = yaml.load(fs.readFileSync(path, 'utf8'))
if (!doc) return
loadedUsers = doc
} catch (e) {
console.log(e)
} else {
return
}

// check duplicates
Expand Down

0 comments on commit 6938218

Please sign in to comment.