diff --git a/hooks.js b/hooks.js index 512d6c2..085f74f 100644 --- a/hooks.js +++ b/hooks.js @@ -3,8 +3,9 @@ const ms = require('ms'); const os = require('os'); const path = require('path'); const { spawn } = require('child_process'); +const { getEnvVar } = require('./env.js'); -const getHooksRoot = () => path.join(os.homedir(), '/.syncthing-hooks'); +const getHooksRoot = () => getEnvVar('ST_HOOK_DIR', path.join(os.homedir(), '/.syncthing-hooks')) const readHooksRoot = async root => { try {