mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 18:01:37 +00:00
Ensure a default working directory is returned when fetching the console working directory. Previously, if a user is switched before running any commands, `Cache::get` would return `null`. Now, it defaults to `'~'` if no value exists. Closes #501.
This commit is contained in:
parent
6143eb94b4
commit
4b8e798e66
@ -63,7 +63,7 @@ function () use ($server, $request, $ssh, $log, $currentDir) {
|
|||||||
public function workingDir(Server $server)
|
public function workingDir(Server $server)
|
||||||
{
|
{
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'dir' => Cache::get('console.'.$server->id.'.dir'),
|
'dir' => Cache::get('console.'.$server->id.'.dir', '~'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user