Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clarification / Question: Resync from new patch-helper-output.txt #10

Closed
amenk opened this issue Dec 5, 2022 · 1 comment
Closed

Clarification / Question: Resync from new patch-helper-output.txt #10

amenk opened this issue Dec 5, 2022 · 1 comment

Comments

@amenk
Copy link

amenk commented Dec 5, 2022

Am I assuming correctly, that once the GUI was started and the results.md / warnings.json is created, the patch-helper-output.txt is no longer used?

I am asking because the Hyvä integration is still under development and I generated plenty of new patch-helper-output.txt files.
I already tracked some changes in the warnings.json (resolved issues) and would like to avoid to tag everything manual again.

I absolutely take "no, that is not possible" as an answer. We just might add an additional sentence to

https://github.com/elgentos/magento2-upgrade-gui#output

"Remark: Once the GUI was started and those files were generated, patch-helper-output.txt is no longer taken into account."

@peterjaap
Copy link
Contributor

peterjaap commented Dec 7, 2022

Your assumption is correct, the patch-helper-output.txt file is only used here on line 277;

if (fs.existsSync(warningsFile) && fs.existsSync(infoNoticesFile)) {
let warningsFileContents = fs.readFileSync(warningsFile).toString();
let infoNoticesFileContents = fs.readFileSync(infoNoticesFile).toString();
win.webContents.send('outputTableParsed', {
warnings: JSON.parse(warningsFileContents),
infoNotices: JSON.parse(infoNoticesFileContents)
})
} else {
let output = fs.readFileSync(outputFile).toString();
if (output) {
let warnings, infoNotices;
[warnings, infoNotices] = parseOutputTable(output);
win.webContents.send('outputTableParsed', {
warnings: warnings,
infoNotices: infoNotices
})
fs.writeFileSync(warningsFile, JSON.stringify(warnings))
fs.writeFileSync(infoNoticesFile, JSON.stringify(infoNotices))
}
}

Right now it still does a check every time the application starts, so we can remove that check when the result files are present.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants