summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2022-11-16 16:25:01 +0100
committerGitHub <noreply@github.com>2022-11-16 16:25:01 +0100
commitcc3ac25c74284d3ad834180891fc072502548c74 (patch)
tree22d689cdf971566dd60bf609131496c087782d08 /src
parented64cff9b505b589136352e605c19cc30082eb46 (diff)
fix(cli): measure cwd from cli client rather than the zellij server (#1947)
* fix(cli): measure cwd from cli client rather than the zellij server * style(fmt): rustfmt
Diffstat (limited to 'src')
-rw-r--r--src/commands.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/commands.rs b/src/commands.rs
index 5f93295a4..93ea21fdd 100644
--- a/src/commands.rs
+++ b/src/commands.rs
@@ -238,7 +238,8 @@ pub(crate) fn convert_old_theme_file(old_theme_file: PathBuf) {
fn attach_with_cli_client(cli_action: zellij_utils::cli::CliAction, session_name: &str) {
let os_input = get_os_input(zellij_client::os_input_output::get_cli_client_os_input);
- match Action::actions_from_cli(cli_action) {
+ let get_current_dir = || std::env::current_dir().unwrap_or_else(|_| PathBuf::from("."));
+ match Action::actions_from_cli(cli_action, Box::new(get_current_dir)) {
Ok(actions) => {
zellij_client::cli_client::start_cli_client(Box::new(os_input), session_name, actions);
std::process::exit(0);