Closed mdanish-kh closed 1 year ago
The GitHub diffs are not correct after https://github.com/microsoft/winget-create/pull/415/commits/83973aa632218217c09ea7a330898a3a8e0083c0. I modified the UpdateSingleInstallerInteractively method but that method had both mixed line endings (CRLF and LF) because of which the diffs are messed up. If you check out the changes in Visual Studio, it'll show you the correct diffs.
If you like I can fix the line endings for UpdateCommand.cs and PackageParser.cs in a new commit as they are the two most high traffic files, though that'll mess the diffs up even more for this PR
/azp run
The GitHub diffs are not correct after 83973aa. I modified the UpdateSingleInstallerInteractively method but that method had both mixed line endings (CRLF and LF) because of which the diffs are messed up. If you check out the changes in Visual Studio, it'll show you the correct diffs.
- Related to CRLF line endings for all sources files #391
If you like I can fix the line endings for UpdateCommand.cs and PackageParser.cs in a new commit as they are the two most high traffic files, though that'll mess the diffs up even more for this PR
If you can do this in a separate PR (after this gets checked in) that would be a huge help! 🙏 That way we can link the related issue to that PR when it gets checked in.
If you can do this in a separate PR (after this gets checked in) that would be a huge help! 🙏 That way we can link the related issue to that PR when it gets checked in.
Gotcha! Will do after this one. I was shying away from fixing the line endings since it'll mess up the git blame
output but I guess fixing it has more value.
/azp run
/azp run
414
This change makes it so we take the last portion of the RelativeFilePath i.e., the file name and search that file name in the new archive for a match. If it is a unique match, we get its RelativeFilePath and use it for the update.
Known limitation is that there are some cases where there may be more than one match in the archive (An example of this being DynamoRIO.DynamoRIO package). This is not handled in this PR and we print out an appropriate message to the user. I'll create an issue for it if this PR gets accepted.
The change to use the whole NestedInstallerFile object instead of previous RelativeFilePaths is so that I can replace this whole object in UpdateInstallerMetadata() and have it updated.
Test packages
Somes packages I found to test this PR with
Multiple matches for RelativeFilePaths (not handled in this PR)
Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-create/pull/415&drop=dogfoodAlpha