hook root from env

This commit is contained in:
bus 2021-04-30 00:39:34 +02:00
parent b60f0b759a
commit 36ff52ae5b

View file

@ -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 {