Skip to content

Commit

Permalink
fix(haraka): for haraka -o, use path.resolve & parsed.configs (#3414)
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson authored Oct 2, 2024
1 parent bfd73e7 commit d8b8f7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit d8b8f7a

Please sign in to comment.