1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! The result of a download, which is all [`UpdateEngine::install`] accepts.
//!
//! [`UpdateEngine::install`]: crate::UpdateEngine::install
use ;
/// A downloaded update that passed the engine's checks, ready for
/// [`UpdateEngine::install`](crate::UpdateEngine::install).
///
/// Only [`UpdateEngine::download`](crate::UpdateEngine::download) creates one,
/// after verifying the file under the configured [`Verification`] policy and
/// the macOS bundle checks, so `install` cannot be handed a file that skipped
/// them. (With [`Verification::Off`] nothing was checked, as configured.) To
/// install an arbitrary file on purpose, call [`crate::install::install`]
/// directly.
///
/// The path is the downloaded `.dmg`, archive, or installer, or — after a
/// delta update — the directory holding the rebuilt app.
///
/// A bare path does not compile:
///
/// ```compile_fail,E0308
/// # use gpui_updater_core::{EngineConfig, GitHubSource, UpdateEngine, Version};
/// # let engine = UpdateEngine::new(GitHubSource::new("o", "r"), EngineConfig::new(Version::new(1, 0, 0)));
/// engine.install(std::path::Path::new("Unverified.dmg"))?;
/// # Ok::<_, gpui_updater_core::Error>(())
/// ```
///
/// [`Verification`]: crate::Verification
/// [`Verification::Off`]: crate::Verification::Off