mirror of
https://github.com/Hilbis/Hilbish
synced 2025-04-02 19:53:23 +00:00
fix: remove appendpath from preload.lua
This commit is contained in:
parent
786b95c266
commit
345ff65da8
17
preload.lua
17
preload.lua
@ -5,23 +5,6 @@ local fs = require 'fs'
|
||||
local commander = require 'commander'
|
||||
local bait = require 'bait'
|
||||
|
||||
commander.register('appendpath', function (args)
|
||||
bait.throw('appendpath', args)
|
||||
local path = ''
|
||||
for i = 1, #args do
|
||||
path = path .. tostring(args[i]) .. ':'
|
||||
end
|
||||
path = path:sub(1, -2)
|
||||
|
||||
local ok, err = pcall(function() fs.appendpath(path) end)
|
||||
if not ok then
|
||||
if err == 1 then
|
||||
print('failed to set path')
|
||||
end
|
||||
bait.throw('command.exit', err)
|
||||
else bait.throw('command.exit', 0) end
|
||||
end)
|
||||
|
||||
commander.register('cd', function (args)
|
||||
bait.throw('cd', args)
|
||||
if #args > 0 then
|
||||
|
Loading…
x
Reference in New Issue
Block a user