Skip to content

Commit 195be3d

Browse files
committed
Set 777 instead of permissions from archive
1 parent 225a070 commit 195be3d

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/tool_cache.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,12 @@ impl ToolCache {
121121
let mut output = BufWriter::new(File::create(&tool_path).unwrap());
122122
io::copy(&mut file, &mut output).unwrap();
123123

124-
// On Unix systems, we need to preserve permissions from the archive
125-
// like executability.
124+
// On Unix systems, mark the tool as executable.
126125
#[cfg(unix)]
127126
{
128127
use std::os::unix::fs::PermissionsExt;
129128

130-
if let Some(mode) = file.unix_mode() {
131-
fs::set_permissions(&tool_path, fs::Permissions::from_mode(mode)).unwrap();
132-
}
129+
fs::set_permissions(&tool_path, fs::Permissions::from_mode(0o777)).unwrap();
133130
}
134131

135132
log::trace!("Updating tool cache");

0 commit comments

Comments
 (0)