Skip to content

Commit

Permalink
fix: don't panic on non-local includes
Browse files Browse the repository at this point in the history
  • Loading branch information
threadexio committed Dec 21, 2024
1 parent 08d3de4 commit fbdff50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parse/source_file.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use eyre::{Context, ContextCompat, Result};
use eyre::{bail, Context, ContextCompat, Result};

use super::directive::Directive;
use super::include::{Include, IncludeKind};
Expand Down Expand Up @@ -32,7 +32,7 @@ impl SourceFile {
})?;

if include.kind != IncludeKind::Local {
panic!("cbundl supports only local includes");
bail!("cbundl supports only local includes");
}

includes.push(include.path);
Expand Down

0 comments on commit fbdff50

Please sign in to comment.