Using SVN’s Hooks:post-commit to update Gitbook how to resolve the error?

  node.js, question

At svn/hooks/post-committee

#!  /bin/sh
 cd /data/gitbook_svn
 $SVN update
 $GITBOOK build

When svn submits the code, it updates the code of /data/Gitbook_svn and executes gitbook build to generate gitbook documents.
Execute command directlysudo sh post-commitIt is possible to update wiki, but if it is submitted from svn, it will report an error. Have you encountered any?

Xiaoyi: gitbookricky $ sudosvci upload voice. md -m"ci "
 Sending uploads voice. md
 Transmitting file data .
 Committed revision 260.
 Warning: post-commit hook failed (exit code 8) with output:
 throw new TypeError('Arguments to path.resolve must be strings');
 TypeError: Arguments to path.resolve must be strings
 at Object.exports.resolve (path.js:313:15)
 at Object.<anonymous> (/usr/lib/node_modules/gitbook-cli/lib/config.js:5:24)
 at Module._compile (module.js:456:26)
 at Object.Module._extensions..js (module.js:474:10)
 at Module.load (module.js:356:32)
 at Function.Module._load (module.js:312:12)
 at Module.require (module.js:364:17)
 at require (module.js:380:17)
 at Object.<anonymous> (/usr/lib/node_modules/gitbook-cli/bin/gitbook.js:11:14)
 at Module._compile (module.js:456:26)

I don’t know much about Node.js, please ask the expert for advice!

There was a problem with the program and gitbook failed to execute. You can check according to the error code.Arguments to path.resolve must be strings, should be in configurationpath.resolveNo match.