From 36ff52ae5b77f44a6e77de1bffe54995bd1fec70 Mon Sep 17 00:00:00 2001 From: bus Date: Fri, 30 Apr 2021 00:39:34 +0200 Subject: [PATCH] hook root from env --- hooks.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {