Created
August 25, 2025 10:54
-
-
Save ilyaluk/422dcb19b6ad78b5dd1b67cb6d495a66 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp b/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp | |
| index 1cd585887..09c42a230 100644 | |
| --- a/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp | |
| +++ b/Source/Tools/LinuxEmulation/LinuxSyscalls/Syscalls.cpp | |
| @@ -164,6 +164,13 @@ static fextl::string GetShebangInterpFile(std::span<char> Data) { | |
| if (FHU::Filesystem::Exists(ShebangProgram)) { | |
| return ShebangProgram; | |
| } | |
| + | |
| + // If the shebang program doesn't exist in rootfs, try the host filesystem | |
| + // This handles cases like /nix | |
| + ShebangProgram = ShebangArguments[0]; | |
| + if (ShebangProgram[0] == '/' && FHU::Filesystem::Exists(ShebangProgram)) { | |
| + return ShebangProgram; | |
| + } | |
| } | |
| return {}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment