We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c0fdb2 commit 84934b5Copy full SHA for 84934b5
mcpx_py/__main__.py
@@ -149,17 +149,19 @@ def killtree(pid):
149
async def run(args):
150
# Setup command history
151
histfile = os.path.join(
152
- os.environ.get("XTP_PLUGIN_CACHE_DIR", "/tmp"), ".mcpx-client-history"
+ os.environ.get("XTP_PLUGIN_CACHE_DIR", os.environ["HOME"]),
153
+ ".mcpx-client-history",
154
)
155
try:
- os.makedirs(os.path.dirname(histfile), exist_ok=True)
156
readline.set_history_length(1000)
157
158
# Try to read existing history
159
160
readline.read_history_file(histfile)
161
except FileNotFoundError:
162
pass
163
+ except PermissionError:
164
+ pass
165
166
# Register history save on exit
167
atexit.register(readline.write_history_file, histfile)
0 commit comments