lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I have a (Ruby) script that runs a Lua script, catches output to stdout and stderr, and makes some HTML output which, among other things, provides links to the file/line where an error occurred. (This is for TextMate on MacOS X.)

Unfortunately, when the path is long, the lua standalone runtime 'helpfully' truncates the paths:

lua: ./../orxit.lua:6: wtf
stack traceback:
	[C]: in function 'assert'
	./../orxit.lua:6: in function 'jibble'
...s/gavinkistner/Desktop/pork \ % : butt/bling/tmp.lua:12: in function 'explode' ...s/gavinkistner/Desktop/pork \ % : butt/bling/tmp.lua:7: in function 'bork' ...s/gavinkistner/Desktop/pork \ % : butt/bling/tmp.lua:15: in main chunk
	[C]: ?

Ignoring the pathological directory name I have there, I have the problem that the interpretter chopped off the leading "/Users/".

Is there any way to tell the runtime NOT to do this truncation? If not, would someone more familiar with the internals than I be kind enough to provide a patch for 5.1 that leaves the full paths intact?

TIA,
Gavin

--
"When I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong."
- R. Buckminster Fuller