aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rwxr-xr-xlua/dep.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/dep.lua b/lua/dep.lua
index 93d665a..2ae3105 100755
--- a/lua/dep.lua
+++ b/lua/dep.lua
@@ -248,6 +248,8 @@ local function run_hooks(package, type)
for i = 1, #hooks do
local ok, err = pcall(hooks[i])
if not ok then
+ vim.fn.chdir(last_cwd)
+
package.error = true
return false, err
end