"nim doc" looks for /usr/doc/nimdoc.css
Task Info (Flyspray) | |
---|---|
Opened By | Carlo Capocasa (capocasa) |
Task ID | 69048 |
Type | Bug Report |
Project | Community Packages |
Category | Packages |
Version | None |
OS | All |
Opened | 2020-12-21 08:53:20 UTC |
Status | Assigned |
Assignee | Levente Polyak (anthraxx) |
Details
Description:
The nim doc
command causes an exception to be thrown due to folder paths incorrectly initialized for the layout in the nim package.
nim doc
by default assumes support files such as nimdoc.css
to live in ../doc
from the location of the nim executable. This works fine if running directly from the build tree, but needs to be adapted by modifying config.cfg for a package within the system directory layout. Relevant variable seems to be conf.prefixDir, but I was unable to set it successfully via a /etc/nim config file or compiler flag.
Steps to reproduce:
pacman -S nim cd /tmp touch foo.nim nim doc foo.nim
Actual output:
Hint: used config file '/etc/nim/nim.cfg' [Conf] Hint: used config file '/etc/nim/config.nims' [Conf] Hint: used config file '/etc/nim/nimdoc.cfg' [Conf] ....Traceback from system (most recent call last) Error: unhandled exception: No such file or directory Additional info: "/usr/doc/nimdoc.css" [OSError]
Expected output:
Hint: used config file '/etc/nim/nim.cfg' [Conf] Hint: used config file '/etc/nim/config.nims' [Conf] Hint: used config file '/etc/nim/nimdoc.cfg' [Conf] Hint: 22665 lines; 0.138s; 20.652MiB peakmem; Debug build; proj: /tmp/foo.nim; out: /tmp/htmldocs/foo.html [SuccessX]