summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--notmuch-ssh-server5
1 files changed, 4 insertions, 1 deletions
diff --git a/notmuch-ssh-server b/notmuch-ssh-server
index 5341994..3ff0559 100644
--- a/notmuch-ssh-server
+++ b/notmuch-ssh-server
@@ -25,13 +25,16 @@ if original_command is None:
25 sys.exit(os.EX_USAGE) 25 sys.exit(os.EX_USAGE)
26 26
27original_command = shlex.split(original_command, comments = True) 27original_command = shlex.split(original_command, comments = True)
28logging.debug("Original command: %s", original_command)
28 29
29if len(original_command) < 1: 30if len(original_command) < 1:
30 sys.exit(os.EX_USAGE) 31 sys.exit(os.EX_USAGE)
31 32
32config_section = original_command[0] 33config_section = original_command[0]
34logging.debug("Config section: %s", config_section)
33 35
34command_environment = config[config_section] if config.has_section(config_section) else config[config.default_section] 36command_environment = config[config_section] if config.has_section(config_section) else config[config.default_section]
37logging.info("Command environment: %s", command_environment)
35 38
36logging.info("notmuch %s # %s", original_command[1:], command_environment) 39logging.info("notmuch %s", original_command[1:])
37os.execvpe('@notmuch@/bin/notmuch', original_command[1:], command_environment) 40os.execvpe('@notmuch@/bin/notmuch', original_command[1:], command_environment)