diff options
author | Yash Singh <saiansh2525@gmail.com> | 2021-04-08 20:56:34 +0300 |
---|---|---|
committer | Gar <gar+gh@danger.computer> | 2021-04-14 19:42:51 +0300 |
commit | f9b639eb6c504ded6cdd59e83e26a392bfe81e5d (patch) | |
tree | 997ad7d8ddb8e281128602795b137426a04112d0 /lib | |
parent | 58914be753e769c534aecc64b5c1883d195cd6dd (diff) |
feat(bugs): fall back to email if provided
If a bugs url is not provided, but a `mailto` is, then that is used.
PR-URL: https://github.com/npm/cli/pull/3052
Credit: @Yash-Singh1
Close: #3052
Reviewed-by: @wraithgar
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bugs.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bugs.js b/lib/bugs.js index a0cef4c5e..5085a25b4 100644 --- a/lib/bugs.js +++ b/lib/bugs.js @@ -43,6 +43,9 @@ class Bugs extends BaseCommand { if (typeof mani.bugs === 'object' && mani.bugs.url) return mani.bugs.url + + if (typeof mani.bugs === 'object' && mani.bugs.email) + return `mailto:${mani.bugs.email}` } // try to get it from the repo, if possible |