-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Winget-Upgrade.ps1 #827
base: main
Are you sure you want to change the base?
Update Winget-Upgrade.ps1 #827
Conversation
Defining a custom source even if not used below (failsafe suggested by github/sebneus mentioned in issues/823)
The file was reformatted using PSScriptAnalyzer and the rules were defined in the helpers/formatter.ps1 file.
@Romanitho @KnifMelti |
Standard settings in VS Code doesn't produce this kind of formatting. Neither does IntelliSense nor any other helper (AI). |
"(..)Standard settings in VS Code doesn't produce this kind of formatting. Neither does IntelliSense nor any other helper (AI)." "(..)Command separator is not needed at the end of a line." Formater script reads all the lines from input text file then applies formatting in memory and saves formatted output to another file. Unfortunately, the use of the PSScriptAnalyzer module is not common despite being one of the best practices for writing PowerShell code. I don't see a better way to protect against 'code spaghettification'. Once this PR is merged into develop, we will be able to safely check if the problem reported by @sebneus is fixed and @Romanitho will be able to safely generate another release from main branch. |
Then I assume this will be an automatic thing in GitHub and we as individuals doesn't need to adapt our environment or have to find a way to convert our files beforehand in our local repos to make it happen. This problem is fixed (tested) but not the other one introduced in #789 the one you have in #817 regarded finding winget in a user run |
"(..)This problem is fixed (tested) but not the other one introduced in #789 That sentence is a bit confusing. It sounds like there are two errors. |
#817 Get-WingetCmd.ps1 doesn't find winget when it runs in user context |
added the EA fix for try-catch
Also I just realized that we are already using linting in MegaLinter PRs. So my mention of the need to format script files is probably unnecessary. |
Defining a custom source even if not used
Proposed Changes
.. and shame on me for not thinking about it earlier.
Related Issues