Fix: questionPath
does not check "~"
This commit is contained in:
parent
0c9ee33072
commit
4097639ab7
2 changed files with 2 additions and 1 deletions
|
@ -800,6 +800,7 @@ console.log('-- saveDir: ' + saveDir);
|
|||
```console
|
||||
Read from :~/fileA
|
||||
No such file or directory: /home/user/fileA
|
||||
Input valid path, please.
|
||||
Read from :pwd
|
||||
/path/to/work
|
||||
Read from :cd ~/project-1
|
||||
|
|
|
@ -944,7 +944,7 @@ exports.questionPath = function(query, options) {
|
|||
keepWhitespace: false,
|
||||
limit: function(value) {
|
||||
var exists, stat, res;
|
||||
value = replaceHomePath(value);
|
||||
value = replaceHomePath(value, true);
|
||||
// mkdir -p
|
||||
function mkdirParents(dirPath) {
|
||||
dirPath.split(/\/|\\/).reduce(function(parents, dir) {
|
||||
|
|
Loading…
Reference in a new issue