* Add show_app() function for displaying `app/bucket@version`
* Add option to skip hash check on install/update
Allows users to install an app when the manifest provides an outdated hash
* Show filename instead of robocopy output when moving fails
* Add new_issue_msg() for nicer error messages (with link bucket repo)
- returns a message with a link to the buckets GitHub repository
- clicking on the link opens a new issues with a predefined title
* Use new_issue_msg() for errors while moving files
- this removes the unreadable robocopy error dumps
* Use new_issue_msg() error handling for check_hash()
* Show robocopy exit code
There exist two size properties in `$host.ui.rawui`, `windowsize` and
`buffersize`. PowerShell ISE doesn't support windowsize, causing
`wraptext` to incorrectly wrap in ISE. (#2190).
In the modern Windows 10 console (and eg the terminal in vscode), the
widths of buffersize and windowsize are always the same.
This change only affects users using pre-Windows 10 conhost, or the
Windows 10 conhost in legacy mode; and furthermore only if they have the
console window sized narrower than the buffer size (giving a horizontal
scroll bar). In this situation, all text in the console is suboptimally
displayed anyway.
- Match only space and tab (\x20\t) instead of all whitespaces (\s)
- Match only supported hash length (32 for md5 until 128 for sha512)
- Ignores everything before the filename
- Fixes a small bug where the last bit matched first digits from the next line but was not an issue because of non-capture group
Removes extra 'ERROR' in text where the `error` method is used.
Converts some `write-host "error message"` to use the `error` method
Converts some `write-host "error message"; exit 1` to use the `abort`
method.
* Fix "enable-encryptionscheme" for OSes before Windows 10
- Tested on Windows 8.1 and Windows 10
- Also fixes indentation + clarifying comment
* Declare type of "enable-encryptionscheme" parameter instead of casting
* Create sh shim
* Fixed syntax error
* Shim CMD and PS only
* Added $arg to shims
* Added Script Switch to CMD
* Added JAR support and secured uninstall
- Add * option to check all installed apps
- Add 60+ sec. pause after 4 queries/min to avoid 429/Too Many Requests
- Add immediate abort if query limit is exceeded
- Add INFO/WARN/ERROR prefixes to messages
- Add DarkGray/DarkCyan/DarkRed colors to INFO/WARN/ERROR messages
- Add using apikey if stored via: scoop config virustotal_api_key apikey
- Change colors to DarkGreen/DarkYellow/Yellow/Red for 0/1/2/3+ hit count
- Remove fragment from URL when submitting to virustotal.com
- Standardized INFO/WARN/ERROR messages
- virustotal: clean up per r15ch13's feedback
* Use Get-FileHash instead of System.Security.Cryptography.HashAlgorithm if available
This satisfies these two cases:
* PowerShell 3 doesn't support Get-FileHash
* PowerShell 6 doesn't support HashAlgorithm yet
* Add tests for compute_hash() function
* Automatically extract the sha1 if it's a SourceForge URL
* Matches downloads.sourceforge.net / sourceforge.net / <anyMirror>.sourceforge.net and rewrites it to sourceforge.net/projects/<project>/files/<pathToFile>