From 64dd52690d66bf3f254360654e2ffb2663e3a4ad Mon Sep 17 00:00:00 2001 From: sammyette Date: Thu, 3 Apr 2025 00:32:11 -0400 Subject: [PATCH] fix: get abs path before doing cd --- nature/commands/cd.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nature/commands/cd.lua b/nature/commands/cd.lua index 284d420..9f532ca 100644 --- a/nature/commands/cd.lua +++ b/nature/commands/cd.lua @@ -17,11 +17,13 @@ commander.register('cd', function (args, sinks) sinks.out:writeln(path) end + local absPath = fs.abs(path) local ok, err = pcall(function() fs.cd(path) end) if not ok then sinks.out:writeln(err) return 1 end + bait.throw('cd', path, oldPath) - bait.throw('hilbish.cd', fs.abs(path), oldPath) + bait.throw('hilbish.cd', absPath, oldPath) end)