Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(haraka): for haraka -o, use path.resolve & parsed.configs #3414

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion bin/haraka
Original file line number Diff line number Diff line change
Expand Up @@ -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 '* '
Expand Down
Loading