2
3
镜像来自 https://github.com/sammy-ette/Hilbish synced 2025-08-10 02:52:03 +00:00

fix: make cd only throw command.exit hooks

This commit is contained in:
TorchedSammy 2021-04-05 18:31:59 -04:00
父節點 fad4282345
當前提交 3460df6863

查看文件

@ -18,12 +18,12 @@ commander.register('cd', function (args)
if err == 1 then if err == 1 then
print('directory does not exist') print('directory does not exist')
end end
bait.throw('command.fail', nil) bait.throw('command.exit', err)
else bait.throw('command.success', nil) end else bait.throw('command.exit', 0) end
return return
end end
fs.cd(os.getenv 'HOME') fs.cd(os.getenv 'HOME')
bait.throw('command.success', nil) bait.throw('command.exit', 0)
end) end)
commander.register('exit', function() commander.register('exit', function()