-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvsdebug_bootstrap.lua
More file actions
40 lines (33 loc) · 1007 Bytes
/
vsdebug_bootstrap.lua
File metadata and controls
40 lines (33 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- очистка консоли
if package.config:sub(1, 1) == "\\" then
os.execute("cls") -- Windows
else
os.execute("clear") -- Linux/Mac
end
-- расширение путей до luarocks
package.path = package.path ..
";%localAppData%/Roaming/luarocks/share/lua/5.4/?.lua" ..
";%localAppData%/Roaming/luarocks/share/lua/5.4/?/init.lua" ..
";src/?.lua;src/moduls/?.lua;package/?.lua"
package.cpath = package.cpath ..
";%localAppData%/Roaming/luarocks/lib/lua/5.4/?.dll"
print();
os.execute("chcp 65001")
print("Current dir:", io.popen("cd"):read("*l"))
print("Modules dir:", package.path)
-- теперь запуск файла
dofile(arg[1])
--[[
-- Тестовый файл
print("\n=== package.path ===")
print(package.path)
print("\n=== package.cpath ===")
print(package.cpath)
local success, busted = pcall(require, "busted.runner")
if success then
print('Busted found successfully!')
busted()
else
print('Busted not found:', busted)
end
]]