-
Notifications
You must be signed in to change notification settings - Fork 612
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #522 from dscho/fix-pcon-installer-option
installer: fix the broken "Enable Pseudo Console Support" option
- Loading branch information
Showing
3 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,32 @@ case "$(git version)" in *2.40.*|*2.[123][0-9].*) true;; *) exit 123;; esac | |
|
||
git ls-remote [email protected]:v3/git-for-windows/git/git main | ||
|
||
die () { | ||
echo "$*" >&2 | ||
exit 1 | ||
} | ||
|
||
pcon_choice="$(sed -n 's/^Enable Pseudo Console Support: //p' /etc/install-options.txt)" || | ||
die 'Could not read /etc/install-options.txt' | ||
|
||
if test -n "$pcon_choice" | ||
then | ||
pcon_config="$(cat /etc/git-bash.config)" || | ||
die 'Could not read /etc/git-bash.config' | ||
|
||
case "$pcon_choice" in | ||
Enabled) | ||
test "MSYS=enable_pcon" = "$pcon_config" || | ||
die "Expected enable_pcon in git-bash.config, but got '$pcon_config'" | ||
;; | ||
Disabled) | ||
test "MSYS=disable_pcon" = "$pcon_config" || | ||
die "Expected disable_pcon in git-bash.config, but got '$pcon_config'" | ||
;; | ||
*) | ||
die "Unexpected Pseudo Console choice: $pcon_choice" | ||
;; | ||
esac | ||
fi | ||
|
||
echo "All checks passed!" >&2 |