From 9dc9fa05c981ea6d85cb3cf9639a6aa12e84e482 Mon Sep 17 00:00:00 2001 From: Zheng Piaodan Date: Sat, 6 May 2023 13:56:16 +0800 Subject: [PATCH] fix: macos cache dir path --- lua/sniprun.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/sniprun.lua b/lua/sniprun.lua index 3e2a3a2e..213516bf 100644 --- a/lua/sniprun.lua +++ b/lua/sniprun.lua @@ -312,8 +312,8 @@ function M.info(arg) print(" ") -- default cache dir is different on Linux and MacOS local default_cache_dir = os.getenv("HOME").."/.cache" - if dir_exists(os.getenv("HOME").."/Library/Cache") then -- we're (probably) on MacOS - default_cache_dir = os.getenv("HOME").."/Library/Cache" + if dir_exists(os.getenv("HOME").."/Library/Caches") then -- we're (probably) on MacOS + default_cache_dir = os.getenv("HOME").."/Library/Caches" end local cache_dir = os.getenv("XDG_CACHE_HOME") or default_cache_dir