From d8b8f7aa61bba48ad7d494d2a2da450a4b70611f Mon Sep 17 00:00:00 2001 From: Matt Simerson Date: Wed, 2 Oct 2024 14:28:19 -0700 Subject: [PATCH] fix(haraka): for haraka -o, use path.resolve & parsed.configs (#3414) --- Changes.md | 2 ++ bin/haraka | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changes.md b/Changes.md index 94dc8cca4..2baae6105 100644 --- a/Changes.md +++ b/Changes.md @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/). ### Unreleased +- fix(bin/haraka): fix for finding path to config/docs/Plugins.md + ### [3.0.5] - 2024-09-27 #### Fixed diff --git a/bin/haraka b/bin/haraka index 170bfbe77..0db61428d 100755 --- a/bin/haraka +++ b/bin/haraka @@ -228,7 +228,8 @@ const plugin_doc = [ function getHooks () { // see haraka/Haraka#3306 - return fs.readFileSync('docs/Plugins.md').toString() + const pi_path = path.resolve(parsed.configs, 'docs', 'Plugins.md') + return fs.readFileSync(pi_path).toString() .split('## Available Hooks')[1] // discard everything before this string .split('### rcpt')[0] // discard everything after this string .match(/\*\s(\S+)/gm) // grab the first word of lines starting with '* '