Revert "fix: run postinstall script explicitly with bash (#4116)" #4231
+1
−1
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.
Summary
This reverts commit b32b4ed.
We are reverting this because we found out that while this fixes the postinstall
on Windows, it breaks it on mac and other devices.
See: #3874 (comment)
Additional Context
This change came in #4116 came from @MaxLOh with the goal of:
While that fixed the postinstall issue on Windows, it broke it for anyone installing with Homebrew since our formula does not depend on
bash
. Instead of modifying the formula, we are opting for reverting b32b4ed and usingsh
instead.Our reasoning is that if someone on Windows has
bash
, surely they havesh
as well.Note: we don't know how @MaxLOh was actually installing code-server so we don't have an exact way to test for their situation but this should work. I had also proposed doing this:
but that assumes the person has
command
installed Windows which may or may not be the case.We think we should also try to add some tests for this, which we may do in a follow-up PR.
Todos
Fixes #3874
Fixes #4209