Skip to content

Commit

Permalink
feat(host): Hide manifest wiki link under macOS
Browse files Browse the repository at this point in the history
Since [1] has been silent for quite a while, I don't see Thunderbird's
developer docs get updated any time soon. So better to hide the link
under macOS to avoid confusion.

[1] thunderbird/developer-docs#147
  • Loading branch information
Frederick888 committed Dec 6, 2022
1 parent e0d5b1a commit c25fe07
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,16 @@ fn print_help() -> anyhow::Result<()> {
match env::current_exe() {
Ok(program_path) => {
let native_app_manifest = AppManifest::new(&program_path.to_string_lossy());
eprintln!(
"Please create '{}.json' manifest file with the JSON below.",
native_app_manifest.name
);
eprintln!(
"Consult https://wiki.mozilla.org/WebExtensions/Native_Messaging for its location."
);
let app_name = native_app_manifest.name;
eprintln!("Please create '{app_name}.json' manifest file with the JSON below.");
if cfg!(target_os = "macos") {
eprintln!(
"Under macOS this is usually ~/Library/Mozilla/NativeMessagingHosts/{}.json.",
native_app_manifest.name
"Under macOS this is usually ~/Library/Mozilla/NativeMessagingHosts/{app_name}.json,\n\
or /Library/Application Support/Mozilla/NativeMessagingHosts/{app_name}.json for global visibility."
);
} else {
eprintln!(
"Consult https://wiki.mozilla.org/WebExtensions/Native_Messaging for its location."
);
}
eprintln!();
Expand Down

0 comments on commit c25fe07

Please sign in to comment.