lanzatool: add error messages

This commit is contained in:
nikstur 2022-11-25 23:48:20 +01:00
parent c87b2a09dc
commit a3ec2cfc15
1 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use anyhow::Result; use anyhow::{Context, Result};
use clap::{Parser, Subcommand}; use clap::{Parser, Subcommand};
use crate::install; use crate::install;
@ -68,8 +68,10 @@ fn install(
auto_enroll: bool, auto_enroll: bool,
bootspec: &Path, bootspec: &Path,
) -> Result<()> { ) -> Result<()> {
let lanzaboote_stub = std::env::var("LANZABOOTE_STUB")?; let lanzaboote_stub =
let initrd_stub = std::env::var("LANZABOOTE_INITRD_STUB")?; std::env::var("LANZABOOTE_STUB").context("Failed to read LANZABOOTE_STUB env variable")?;
let initrd_stub = std::env::var("LANZABOOTE_INITRD_STUB")
.context("Failed to read LANZABOOTE_INITRD_STUB env variable")?;
install::install( install::install(
public_key, public_key,