Updates to nix shell script#95
Merged
ManlyMarco merged 4 commits intoNeighTools:masterfrom Feb 2, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates the Unix/Linux shell script (run.sh) to address several user-reported issues and improve error handling. The changes focus on making the script more robust and providing better feedback when errors occur.
Changes:
- Added
set -eto halt execution on unexpected errors, preventing cascading failures - Simplified Steam executable detection by checking if arguments are prefixed with the working directory path
- Added explicit detection and error messaging for Windows PE32 executables
- Added fallback support for games that launch shell scripts instead of binaries
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…le located in the working directory
317ba2f to
6abda2f
Compare
|
LGTM |
ManlyMarco
approved these changes
Feb 2, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Multiple updates to the nix run.sh mostly to correct for observed issues from users.
1. Add set -e to halt on any unexpected errors
At least one issue was observed where the file command was not available on a users system. An error was thrown but the script continued and threw more errors. Now it will just stop on any unexpected errors.
#91
2. Add error and exit when Windows executable is detected
This was included in the BepInEx 6 branch some time ago but never made it into upstream and back to BepInEx 5 or other branches. This is an extremely common user error that will now get a correct error message.
3. Allow the rare usage of Steam launching a shell script
There are a few rare games on Steam where the developers call a shell script instead of a binary. They might not work with this change but it at least provide a boilerplate spot for more game specific changes to be placed if needed.
4. Change Steam executable detection to a simpler check for a file located in the working directory
My original solution for a way that did not require executable_name to be set was overly complicated and depended on game executables having the default file extensions from Unity. This solution simply looks for an argument that has a matching prefix with the working directory. Before launching a game, Steam sets the working directory to the game directory then launches the executable in the game directory by absolute path.