Skip to content

Commit a9ef7a2

Browse files
committed
fix: update last status count after removing source directory
1 parent 581b2c0 commit a9ef7a2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/nvim_updater/init.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ function P.remove_source_dir(opts)
196196
-- Use pcall to attempt to call the function
197197
local success, err = pcall(vim.fs.rm, source_dir, { recursive = true, force = true })
198198
if success then
199+
P.last_status.count = "?"
199200
utils.notify("Successfully removed Neovim source directory: " .. source_dir, vim.log.levels.INFO, true)
200201
utils.notify("Source directory removed with vim.fs.rm", vim.log.levels.DEBUG)
201202
update_with_retry()
@@ -210,6 +211,7 @@ function P.remove_source_dir(opts)
210211
local function check_rm()
211212
-- Check if the source directory still exists
212213
if not utils.directory_exists(source_dir) then
214+
P.last_status.count = "?"
213215
utils.notify(
214216
"Successfully removed Neovim source directory: " .. source_dir,
215217
vim.log.levels.INFO,
@@ -254,6 +256,7 @@ function P.remove_source_dir(opts)
254256
-- Fallback to vim.fn.delete if vim.fs.rm is not available
255257
local success, err = vim.fn.delete(source_dir, "rf")
256258
if success == 0 then
259+
P.last_status.count = "?"
257260
utils.notify("Successfully removed Neovim source directory: " .. source_dir, vim.log.levels.INFO, true)
258261
utils.notify("Source directory removed with vim.fn.delete", vim.log.levels.DEBUG)
259262
update_with_retry()

0 commit comments

Comments
 (0)