![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Sanjoy Mahajan wrote:
def locatedlocaltree - return `kpsewhich --expand-var $TEXMFLOCAL`.chomp rescue nil + return `kpsewhich --expand-var '$TEXMFLOCAL'`.chomp rescue nil end
returns 'result' here can you try: def locatedlocaltree tree = `kpsewhich --expand-path $TEXMFLOCAL`.chomp rescue nil unless tree && FileTest.directory?(tree) then tree = `kpsewhich --expand-path $TEXMF`.chomp rescue nil end return tree end (uses expand-path instead) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------