From 3460df6863f9fff236744cad998f0692497c63c7 Mon Sep 17 00:00:00 2001 From: TorchedSammy <38820196+TorchedSammy@users.noreply.github.com> Date: Mon, 5 Apr 2021 18:31:59 -0400 Subject: [PATCH] fix: make cd only throw command.exit hooks --- preload.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/preload.lua b/preload.lua index b054251..a5d087f 100644 --- a/preload.lua +++ b/preload.lua @@ -18,12 +18,12 @@ commander.register('cd', function (args) if err == 1 then print('directory does not exist') end - bait.throw('command.fail', nil) - else bait.throw('command.success', nil) end + bait.throw('command.exit', err) + else bait.throw('command.exit', 0) end return end fs.cd(os.getenv 'HOME') - bait.throw('command.success', nil) + bait.throw('command.exit', 0) end) commander.register('exit', function()