Skip to content

Commit

Permalink
avoid a panic
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <william@yossarian.net>
  • Loading branch information
woodruffw committed Sep 21, 2024
1 parent 91a3a89 commit 656660d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/models.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{collections::hash_map, iter::Enumerate, ops::Deref, path::Path};

use anyhow::{Context, Result};
use anyhow::{anyhow, Context, Result};
use github_actions_models::workflow;

use crate::finding::{JobOrKeys, WorkflowLocation};
Expand Down Expand Up @@ -32,7 +32,7 @@ impl Workflow {
path: p
.as_ref()
.to_str()
.expect("API misuse: workflow paths are UTF-8")
.ok_or_else(|| anyhow!("invalid workflow: path is not UTF-8"))?
.to_string(),
document,
inner,
Expand Down

0 comments on commit 656660d

Please sign in to comment.