Skip to content

Commit

Permalink
fix: 修复untildify
Browse files Browse the repository at this point in the history
  • Loading branch information
gml authored and gml committed Oct 21, 2016
1 parent d8e1b5b commit 945a42c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const home = os.homedir();


function untildify(str) {
if (_.isString(str) !== 'string') {
if (_.isString(str)) {
throw new Error(`Expected a string, got ${typeof str}`);
}
return home ? str.replace(/^~($|\/|\\)/, `${home}$1`) : str;
Expand Down

0 comments on commit 945a42c

Please sign in to comment.