Skip to content

Commit

Permalink
read to String directly without extra conversion
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Dec 28, 2024
1 parent 391914e commit 3865e00
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/bootstrap/src/core/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ impl Config {
if !path_is_dylib(fname) {
// Finally, set the correct .interp for binaries
let dynamic_linker_path = nix_deps_dir.join("nix-support/dynamic-linker");
// FIXME: can we support utf8 here? `args` doesn't accept Vec<u8>, only OsString ...
let dynamic_linker = t!(String::from_utf8(t!(fs::read(dynamic_linker_path))));
let dynamic_linker = t!(fs::read_to_string(dynamic_linker_path));
patchelf.args(["--set-interpreter", dynamic_linker.trim_end()]);
}

Expand Down

0 comments on commit 3865e00

Please sign in to comment.