Skip to content

Commit 856821f

Browse files
committed
fixed problem with fullPath when changing directory
1 parent 87ea71d commit 856821f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Jump.Location/JumpLocationCommand.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,13 @@ protected override void ProcessRecord()
7474
var best = Controller.FindBest(Query);
7575
if (best == null) throw new LocationNotFoundException(Query.First());
7676

77-
var fullPath = GetResultPath(best);
78-
ChangeDirectory(fullPath);
77+
ChangeDirectory(best.Path);
7978
}
8079

8180
private void ChangeDirectory(string fullPath)
8281
{
8382
var verb = Push ? "Push" : "Set";
84-
InvokeCommand.InvokeScript(string.Format("{1}-Location \"{0}\"", fullPath, verb));
83+
InvokeCommand.InvokeScript(string.Format("{1}-Location '{0}'", fullPath.Trim(), verb));
8584
}
8685
}
8786
}

0 commit comments

Comments
 (0)