mirror of
https://github.com/Ed94/pikuma_ps1.git
synced 2026-07-12 20:31:25 -07:00
decruft lua warnings.
This commit is contained in:
@@ -56,7 +56,11 @@ local function write_file(path, content)
|
||||
f:close()
|
||||
end
|
||||
|
||||
local function ensure_dir(path) os.execute('mkdir -p "' .. path .. '"') end
|
||||
-- PowerShell aliases `mkdir` to New-Item, which treats `-p` as a path, so guard the call.
|
||||
local function ensure_dir(path)
|
||||
local is_win = package.config:sub(1, 1) == "\\"
|
||||
os.execute(is_win and ('if not exist "' .. path .. '" mkdir "' .. path .. '"') or ('mkdir -p "' .. path .. '" 2>/dev/null'))
|
||||
end
|
||||
|
||||
-- ============================================================
|
||||
-- String primitives
|
||||
@@ -532,11 +536,11 @@ end
|
||||
-- ============================================================
|
||||
|
||||
local function process_source(source_path, word_counts)
|
||||
local source = read_file(source_path)
|
||||
local source = read_file(source_path)
|
||||
local atoms_raw = find_atoms(source)
|
||||
|
||||
if #atoms_raw == 0 then
|
||||
io.stderr:write(" note: no MipsAtom_ declarations in " .. source_path .. "\n")
|
||||
-- io.stderr:write(" note: no MipsAtom_ declarations in " .. source_path .. "\n")
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user