Skip to content

Commit

Permalink
Fix macOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
cd-work committed Oct 11, 2023
1 parent 545df0b commit 7424082
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
//! Sandboxing errors.
use std::error::Error as StdError;
#[cfg(target_os = "macos")]
use std::ffi::OsString;
use std::fmt::{self, Display, Formatter};
use std::io::Error as IoError;
use std::path::PathBuf;
Expand Down
2 changes: 1 addition & 1 deletion src/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl Sandbox for MacSandbox {
fn escape_path(path: PathBuf) -> StdResult<String, Error> {
// Canonicalize the incoming path to support relative paths.
// The `subpath` action only allows absolute paths.
let canonical_path = fs::canonicalize(&path).map_err(|_| Error::InvalidPath(path))?;
let canonical_path = fs::canonicalize(&path).map_err(|_| Error::InvalidPath(path.clone()))?;

let mut path_str =
canonical_path.into_os_string().into_string().map_err(|_| Error::InvalidPath(path))?;
Expand Down

0 comments on commit 7424082

Please sign in to comment.