Skip to content

Commit

Permalink
Cannot read property 'startsWith' of undefined. Fixes gh-75
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Feb 17, 2021
1 parent 8cc6085 commit c6cf8b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ class Config {
}

resolvePath(input) {
if (!input) {
return input;
}

if (input.startsWith('~/')) {
return path.join(os.homedir(), input.slice(2));
} else if (input === '~') {
Expand Down

0 comments on commit c6cf8b7

Please sign in to comment.