Skip to content

Commit

Permalink
Merge pull request #522 from dscho/fix-pcon-installer-option
Browse files Browse the repository at this point in the history
installer: fix the broken "Enable Pseudo Console Support" option
  • Loading branch information
dscho authored Aug 25, 2023
2 parents 669cf8b + 8afe9fc commit 9ed24ff
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
7 changes: 2 additions & 5 deletions installer/checklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@ After building new installers, check that
- `gitk` runs and shows the history
- `git gui` runs and does not complain about a missing repository
- `git help git` opens the page and it has no verbatim `linkgit:`
- `curl --version` lists `IPv6` in the last line
- verify that `git -c http.sslbackend=schannel2 ls-remote
https://github.com/dscho/images` errors out, and that it works with
schannel and openssl
- verify that `git ls-remote` works with a VSTS SSH URL
- `run-checklist.sh` passes (performs a couple automated tests related
to cURL, the Git version, etc)
- Git CMD
- starts
- `git log` in a repository is colorful and stops after the first page
Expand Down
2 changes: 1 addition & 1 deletion installer/install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -3184,7 +3184,7 @@ begin
if not SaveStringToFile(ExpandConstant('{app}\etc\git-bash.config'),'MSYS=enable_pcon',False) then begin
LogError('Could not write to '+ExpandConstant('{app}\etc\git-bash.config'))
end
else
end else begin
if not SaveStringToFile(ExpandConstant('{app}\etc\git-bash.config'),'MSYS=disable_pcon',False) then begin
LogError('Could not write to '+ExpandConstant('{app}\etc\git-bash.config'))
end
Expand Down
28 changes: 28 additions & 0 deletions installer/run-checklist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9ed24ff

Please sign in to comment.