mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
fix(console) change dir if current dir removed
This commit is contained in:
parent
bf5f132893
commit
a6c278a574
1 changed files with 5 additions and 3 deletions
|
|
@ -282,10 +282,12 @@
|
|||
isRootOrHome = equalPart(paramDir, ['/', '~']),
|
||||
getDir = WIN ? 'chdir' : 'pwd';
|
||||
|
||||
if (!isRootOrHome && !isChangeVolume || isVolume)
|
||||
command = 'cd ' + path.join(currDir, paramDir);
|
||||
if (!isRootOrHome && !isChangeVolume || isVolume) {
|
||||
paramDir = path.join(currDir, paramDir);
|
||||
command = 'cd ' + paramDir;
|
||||
}
|
||||
|
||||
exec(command + ' && ' + getDir, {cwd : currDir}, function (error, stdout, stderr) {
|
||||
exec(command + ' && ' + getDir, {cwd : paramDir}, function (error, stdout, stderr) {
|
||||
var errorStr = '';
|
||||
|
||||
if (stderr)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue