We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 51a5aaa commit 759a40aCopy full SHA for 759a40a
1 file changed
src/hooks/mod.rs
@@ -1,6 +1,6 @@
1
use anyhow::{Context, Result};
2
use clap::Subcommand;
3
-use std::{fs, os::unix::fs::PermissionsExt, path::Path};
+use std::{fs, path::Path};
4
5
use crate::utils::{confirm, find_repo_root};
6
@@ -166,6 +166,7 @@ fn show(hook: &str) -> Result<()> {
166
167
#[cfg(unix)]
168
fn set_executable(path: &Path) -> Result<()> {
169
+ use std::os::unix::fs::PermissionsExt;
170
let mut perms = fs::metadata(path)?.permissions();
171
perms.set_mode(0o755);
172
fs::set_permissions(path, perms).context("Failed to set executable permission")?;
0 commit comments