feat(commands/doc): use local docs directory if hilbish branch is found

readline-upstream
sammyette 2023-01-07 14:01:57 -04:00
parent 5814462f5d
commit 4e023703b6
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,11 @@ local lunacolors = require 'lunacolors'
commander.register('doc', function(args)
local moddocPath = hilbish.dataDir .. '/docs/'
local stat = fs.stat '.git/refs/heads/extended-job-api'
if stat then
-- hilbish git
moddocPath = './docs/'
end
local apidocHeader = [[
# %s
{grayBg} {white}{italic}%s {reset}