Skip to content

Commit

Permalink
use indoc for message formatting (#857)
Browse files Browse the repository at this point in the history
  • Loading branch information
roele committed Aug 29, 2023
1 parent e8ea652 commit 5aabc9c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/plugins/core/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::fs::{self};
use std::path::{Path, PathBuf};

use color_eyre::eyre::{eyre, Result};
use indoc::formatdoc;
use itertools::Itertools;
use once_cell::sync::Lazy;
use serde_derive::{Deserialize, Serialize};
Expand Down Expand Up @@ -175,12 +176,15 @@ impl JavaPlugin {
&tv.install_path().join("Contents").join("Home"),
)?;
info!(
"To enable macOS integration, run the following commands:\n\
sudo mkdir /Library/Java/JavaVirtualMachines/{}.jdk;\n\
sudo ln -s {}/Contents /Library/Java/JavaVirtualMachines/{}.jdk/Contents;\n",
tv.version,
tv.install_path().display(),
tv.version
"{}",
formatdoc! {r#"
To enable macOS integration, run the following commands:
sudo mkdir /Library/Java/JavaVirtualMachines/{version}.jdk
sudo ln -s {path}/Contents /Library/Java/JavaVirtualMachines/{version}.jdk/Contents
"#,
version = tv.version,
path = tv.install_path().display(),
}

Check warning on line 187 in src/plugins/core/java.rs

View check run for this annotation

Codecov / codecov/patch

src/plugins/core/java.rs#L174-L187

Added lines #L174 - L187 were not covered by tests
);
}

Expand Down

0 comments on commit 5aabc9c

Please sign in to comment.