Print is off where it is not built; no blocked command runs from the palette (D-08)

This commit is contained in:
ZacharyZhang-NY committed 2026-10-10 02:17:18 -04:00
1 parent 58e55cf35a
commit 92b515cbf8
5 files changed
+81 -14

No files matched your search

+5 -2
View File
@@ -2,6 +2,9 @@
use std::path::Path;
/// This build has a system print panel.
pub const BUILT: bool = cfg!(target_os = "macos");
/// Shows the print panel for `pdf`; false when cancelled.
#[cfg(target_os = "macos")]
pub fn print_pdf(pdf: &Path) -> anyhow::Result<bool> {
@@ -85,8 +88,8 @@ fn paper_for(sizes: &[(f64, f64)]) -> Option<(f64, f64)> {
/// Printing needs a system panel this platform build lacks.
#[cfg(not(target_os = "macos"))]
pub fn print_pdf(pdf: &Path) -> anyhow::Result<bool> {
anyhow::bail!("printing {} is not built on this platform", pdf.display())
pub fn print_pdf(_: &Path) -> anyhow::Result<bool> {
anyhow::bail!("printing is not built on this platform")
}
#[cfg(test)]