Skip to main content

release_kit/commands/
license.rs

1//! `rk license`: print the terms the binary carries.
2
3use crate::embedded;
4use crate::error::RkError;
5use crate::output::Output;
6
7/// Print the root statement, then both license texts.
8///
9/// # Errors
10///
11/// Never fails; the signature matches the dispatch table.
12pub fn run() -> Result<(), RkError> {
13    let out = Output::human();
14    out.result_raw(embedded::LICENSE);
15    out.result_line("");
16    out.result_line("--- LICENSE-MIT ---");
17    out.result_line("");
18    out.result_raw(embedded::LICENSE_MIT);
19    out.result_line("");
20    out.result_line("--- LICENSE-CC-BY-4.0 ---");
21    out.result_line("");
22    out.result_raw(embedded::LICENSE_CC_BY);
23    Ok(())
24}