Skip to content

Commit

Permalink
Work around an auth-source bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Dec 3, 2017
1 parent 58e4a46 commit 3ba8646
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ghub.el
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,14 @@ Create and store such a token? "
(mapcar #'value key:s)
(value key:s)))))

(define-advice auth-source-netrc-parse-next-interesting
(:around (fn) save-match-data)
"Save match-data for the benefit of caller `auth-source-netrc-parse-one'.
Without wrapping this function in `save-match-data' the caller
won't see the secret from a line that is followed by a commented
line."
(save-match-data (funcall fn)))

;;; ghub.el ends soon
(provide 'ghub)
;; Local Variables:
Expand Down

0 comments on commit 3ba8646

Please sign in to comment.