mirror of
https://github.com/NeoFlock/neonucleus.git
synced 2025-09-24 17:13:31 +02:00
15 lines
330 B
Lua
15 lines
330 B
Lua
local shell = require("shell")
|
|
local fs = require("filesystem")
|
|
local _,op = shell.parse(...)
|
|
|
|
local path, why = shell.getWorkingDirectory(), ""
|
|
if op.P then
|
|
path, why = fs.realPath(path)
|
|
end
|
|
if not path then
|
|
io.stderr:write(string.format("error retrieving current directory: %s", why))
|
|
os.exit(1)
|
|
end
|
|
|
|
io.write(path, "\n")
|