From 312076396657425960fede4968adabdf80ec6813 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 26 Oct 2022 05:52:36 +0800 Subject: [PATCH] fixes recurring bug --- prompt.py | 6 +++--- server/table.h | 9 +++++++++ tests/{simple2 => jose_gh.a} | 13 ++++++++++++- tests/udf5.a | 10 ---------- 4 files changed, 24 insertions(+), 14 deletions(-) rename tests/{simple2 => jose_gh.a} (70%) delete mode 100644 tests/udf5.a diff --git a/prompt.py b/prompt.py index 9c486f1..cc6cb15 100644 --- a/prompt.py +++ b/prompt.py @@ -499,17 +499,17 @@ def prompt(running = lambda:True, next = lambda:input('> '), state = None): rm(state) exit() elif q.startswith('sh'): - from distutils.spawn import find_executable + from shutil import which qs = re.split(r'[ \t]', q) shells = ('zsh', 'bash', 'sh', 'fish', 'cmd', 'pwsh', 'powershell', 'csh', 'tcsh', 'ksh') shell_path = '' if len(qs) > 1 and qs[1] in shells: - shell_path = find_executable(qs[1]) + shell_path = which(qs[1]) if shell_path: os.system(shell_path) else: for sh in shells: - shell_path = find_executable(sh) + shell_path = which(sh) if shell_path: os.system(shell_path) break diff --git a/server/table.h b/server/table.h index f3911af..782397e 100644 --- a/server/table.h +++ b/server/table.h @@ -75,6 +75,15 @@ public: this->name = name; } template