diff --git a/sandbox/restricted.yaml b/sandbox/restricted.yaml index 292bfc5..3d0e1f2 100644 --- a/sandbox/restricted.yaml +++ b/sandbox/restricted.yaml @@ -17,6 +17,9 @@ filesystem: - "{HOME}/.local/bin" - "{HOME}/opt" - "{PLAN9}/bin" + - "{HOME}/.pyenv" + - "{HOME}/.rbenv" + - "{HOME}/.nvm" rw: - "/dev/null" - "/tmp" diff --git a/tools/memory_recall b/tools/memory_recall index 9f793fb..bed7f3c 100755 --- a/tools/memory_recall +++ b/tools/memory_recall @@ -6,7 +6,6 @@ mount="${OLLIE_9MOUNT:-$HOME/mnt/ollie}" mem_dir="$mount/m" -mkdir -p "$mem_dir" query="$*" diff --git a/tools/memory_remember b/tools/memory_remember index 8dd3100..411b4b1 100755 --- a/tools/memory_remember +++ b/tools/memory_remember @@ -17,7 +17,6 @@ body = sys.argv[3] mount = os.environ.get("OLLIE_9MOUNT") or os.path.expanduser("~/mnt/ollie") mem_dir = os.path.join(mount, "m") -os.makedirs(mem_dir, exist_ok=True) now = datetime.now() ident = now.strftime("%Y%m%dT%H%M%S") @@ -48,7 +47,11 @@ signature: {body} """ -with open(path, "w") as f: - f.write(content) +try: + with open(path, "w") as f: + f.write(content) +except OSError as e: + print(f"error: failed to write {path}: {e}") + sys.exit(1) -print(filename) +print(f"saved: {filename}")