Skip to content

Commit

Permalink
fix: make cd only throw command.exit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
TorchedSammy committed Apr 5, 2021
1 parent fad4282 commit 3460df6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions preload.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3460df6

Please sign in to comment.