L3au/gitbook-plugin-git-author

Doesn't seem to work on gitbook.com builds

mattwynne opened this issue · 2 comments

Hi, I've tried using this plugin on a book published via gitbook.com, but I see this error in the build:

warn: initialize git repository and commit files firstly{ [Error: Command failed: /bin/sh -c git log --format="%an|%at" -- /tmp/book/README.md
fatal: Not a git repository (or any of the parent directories): .git
]
  killed: false,
  code: 128,
  signal: null,
  cmd: '/bin/sh -c git log --format="%an|%at" -- /tmp/book/README.md',
  stdout: '',
  stderr: 'fatal: Not a git repository (or any of the parent directories): .git\n' }

I'm guessing that this plugin makes some assumptions about the environment that aren't valid when GitBook builds the book. Do you have any knowledge of a workaround?

Dupe of #1

Shame. I think it would help to document this limitation somewhere so it's more obvious. I'm going to ask the Gitbooks people too, just in case.

Thanks anyway!