rust-lang / rust-installer

The Bourne shell installer used by Rust and Cargo
Apache License 2.0
60 stars 68 forks source link

Use tar's append_data to add executables on Windows #67

Closed cuviper closed 7 years ago

cuviper commented 7 years ago

Since Windows doesn't really have Posix file modes, the tar crate only sets file modes based on whether the source is readonly. But we do want stuff like install.sh to be executable when extracted elsewhere.

Now we create a manual header for our files, and add the executable bit on files matching whitelisted extensions (exe, dll, py, sh). That's not trying to be exhaustive or perfect, but it's hopefully good enough to have functional rust packages.

cuviper commented 7 years ago

r? @alexcrichton