From c9237452b50751407c1ed7c1983ed3c3403cec35 Mon Sep 17 00:00:00 2001 From: Michael-F-Bryan Date: Thu, 15 Jun 2023 18:13:15 +0800 Subject: [PATCH] Fixed a compile error on Linux --- lib/cli/src/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cli/src/cli.rs b/lib/cli/src/cli.rs index 60c20091208..95d5401d19e 100644 --- a/lib/cli/src/cli.rs +++ b/lib/cli/src/cli.rs @@ -271,7 +271,7 @@ fn is_binfmt_interpreter() -> bool { Some(path) => PathBuf::from(path), None => return false, }; - binary_path.file_name() == OsStr::from(Binfmt::FILENAME) + binary_path.file_name().and_then(|f| f.to_str()) == Some(Binfmt::FILENAME) } else { false }