installer: fix the scalar reconfigure --all
invocation
#569
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.
When running the installer of
microsoft/git
v2.45.2.vfs.0.2, it is possible to run into this error:The most likely reason is a recent change in InnoSetup (and therefore affects both
microsoft/git
and regular Git for Windows), concretely: this one.Essentially, when creating a safe directory, InnoSetup now protects it via reduced permissions (e.g. allowing the original user who started the installer only to read, but not write into the directory) if it is in a temporary directory on a local drive.
This is affects e.g. the
ExecSilentlyAsOriginalUser()
function which wants to writestdout
andstderr
into two files in the temporary directory that is created by InnoSetup.Earlier, this was possible because the safe directory still allowed the original user to write into it, but now that is no longer the case.
As a work-around, let's write those two files directly into the
%TEMP%
directory of the original user (where the account has write permissions). To do that, we use the fact that{tmp}
refers to a subdirectory, and by appending some unique suffix we can construct a path to such a file.This fixes git-for-windows/git#5038.