Commit Graph
561 Commits
Author SHA1 Message Date
Nick Budidharma c98fc17479 Update strip_filename skips (#2401)
Portableapps.com has switched to portableapps.duckduckgo.com as their freeware host and skipping strip_filename is no longer required.
Remove downloads subdomain from sourceforge.net to allow mirror redirect urls (e.g. https://sourceforge.net/projects/phppgadmin/files/latest/download).
2018-07-18 17:30:31 +02:00
Richard Kuhnt 0c2b3da3ff Don't send referer to portableapps.com 2018-07-16 14:09:39 +02:00
Richard Kuhnt 7a6218c586 Show message about missing bucket when installing dependencies 2018-07-15 17:57:34 +02:00
Richard Kuhnt 4c9beee8f2 Add filename to warning for files without hash in the manifest 2018-07-13 17:11:26 +02:00
Richard Kuhnt 0b13f37bc1 fix a bug introduced with e2792f2e
"break" prevented the extraction of multiple archive files
2018-07-10 21:31:46 +02:00
Richard Kuhnt 360c789965 Fix robocopy parameters (introduced with e2792f2e solving #2305) 2018-07-09 21:03:31 +02:00
Richard Kuhnt e4cbb42e64 Show first 8 bytes of file in the hash check error message 2018-07-09 13:14:38 +02:00
Richard Kuhnt e2792f2e02 Fix robocopy not releasing a directory after moving it (closes #2305)
- Use System.Diagnostics.Process for better control
- Wait up to 1 second after moving a directory, so robocopy can terminate its threads
2018-07-09 12:34:00 +02:00
Ross Smith II 5e8a0feb6e Change multiline strings to arrays (#2363) 2018-07-07 23:16:09 +02:00
Richard Kuhnt 8504338bc5 Show warning about SourceForge.net hash validation fails 2018-06-28 19:00:35 +02:00
shorez d478a26ad0 Add basic WSL support by appending .exe to powershell (#2323) 2018-06-21 14:00:14 -07:00
Richard Kuhnt e8eaa3009a Fix installing manifest from UNC path (closes #2296) 2018-06-18 12:34:38 +02:00
Richard Kuhnt b29213d542 Fix "No hash in manifest." bug introduced in f8f9b75f 2018-06-14 18:37:23 +02:00
Richard Kuhnt f8f9b75f05 Option to skip hash validation and error message improvements (#2260)
* 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
2018-06-14 18:30:05 +02:00
Richard Kuhnt ff9c0c3daf parse_app(): fix for relative paths 2018-05-07 14:18:40 +02:00
Ross Smith II 0391a5df49 Fix #2243 2018-05-05 08:36:48 -07:00
Richard Kuhnt 70f64c8f4b Refactor app() to parse_app() for better "bucket/app@version" handling (#2234)
It now parses these app names:
- php-bucket/php71-amqp@1.8.0
- php-bucket/php71-amqp
- php71-amqp@1.8.0
- php71-amqp@1.9.0-rc2

Removed:
- is_app_with_specific_version()
- get_app_with_version()
2018-05-04 21:51:43 +02:00
Ross Smith II 0e2c253f38 Warn on shim overwrite (#2033) 2018-05-04 20:02:16 +02:00
demesne da010e027d Add support for + symbols in version string (#1751)
To support oracle JDK 9 changes to the version numbering - [major.minor.security.patch+build].
2018-05-04 19:27:28 +02:00
Brandon Smith 0c808722a6 Remove env_ensure_home (#1967) 2018-05-04 19:22:59 +02:00
Vladimir Chebotarev 3e14f37b3f Enabled shimming of external applications (#2072)
* Enabled shimming of external applications

* Improved correctness of target binding at shimming point.

* Fixed '| % { return ... }' issue.
2018-05-04 19:17:23 +02:00
Vladimir Chebotarev 6236750011 Fixed ps1/jar->ps1 shims args handling. (#2120) 2018-05-04 19:16:45 +02:00
Vladimir Chebotarev 563a1730a4 Temporary fixed passing arguments to ps1 shims. (#2118) 2018-05-04 19:16:35 +02:00
Richard Kuhnt cc9412c0ec Replace spaces after matching hash extraction
It's now possible to extract hashes with this format:
AF 45 EE B0 6D C1 BE EE  6D 4C 70 B9 2C 0E 02 37
2018-04-21 22:32:14 +02:00
Steve Baker 9eca252913 wraptext: use buffer width instead of window width (fixes #2190) (#2191)
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.
2018-04-12 20:29:27 +02:00
Steve Baker d056d0054f Disable fancy progress when in ISE (fixes #2171) (#2189)
Sometimes [console]::isoutputredirected becomes False when in ISE, so we
need an extra check to prevent the fancy progress bar trying to display
here.
2018-04-10 22:54:14 +02:00
Richard Kuhnt f3f559c460 Improve is_scoop_outdated() and add last_scoop_update() 2018-03-21 17:09:11 +01:00
Richard Kuhnt 16aec1a40b Save and load true/false values as booleans in scoops config 2018-03-21 16:40:55 +01:00
Richard Kuhnt cac9975924 Disable git pager when running git log (#2144) 2018-03-21 14:54:09 +01:00
Richard Kuhnt 12962acfa8 Use consistent User-Agent Header on all webrequests 2018-03-18 16:35:01 +01:00
Richard Kuhnt 21bf0dea56 Improve auto-update hash extraction regex
- 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
2018-03-18 15:34:39 +01:00
Chawye Hsu 731247876d [Pending] Finally we add the code linting and its tests! (#2108)
* Lint: PSPossibleIncorrectComparisonWithNull

* Lint: PSUseLiteralInitializerForHashtable

* Lint: PSUseBOMForUnicodeEncodedFile

* Lint: PSUseApprovedVerbs

* Lint: PSAvoidGlobalVars

* Lint: PSAvoidUsingEmptyCatchBlock

* Lint: PSUseShouldProcessForStateChangingFunctions

* Lint helper: Add PSScriptAnalyzer integration for vscode

* Fix lint: PSUseBOMForUnicodeEncodedFile

* Tests: ignore previous TestResults.xml

* Tests: add PowerShell script linting into tests!

* Add PSScriptAnalyzer into appveyor ci

* Update Scoop-Linting.Tests.ps1
2018-03-13 14:26:55 +01:00
Pierre CHARLES 071af50671 Added retry when unzip fail because of AV (#1822) 2018-03-12 21:23:21 +01:00
Steve Baker 31075f6200 Clean up some error messages (#2032)
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.
2018-03-12 18:32:57 +01:00
Vladimir Chebotarev a9277710ee Added exclusion for sourceforge. [#METR-21516] (#2109) 2018-03-10 23:37:14 +01:00
Milan Gardian 63b325c4cb Fix "enable-encryptionscheme" for OSes before Windows 10 (#2084)
* 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
2018-03-04 14:07:07 +01:00
Steve Baker 9a3fc965ef Add .bz2 files to decompression (#2085)
Add .bz2 files to decompression
2018-03-04 10:26:59 +01:00
Chawye Hsu e1bb1e91d0 Lint: PSAvoidUsingCmdletAliases (#2075) 2018-03-03 18:41:19 +01:00
Asad Saeeduddin 039f28b109 Enable TLS 1.2 in core.ps1 (#2074)
Enable TLS 1.2 in core.ps1
2018-03-02 06:04:25 +01:00
Vladimir Chebotarev 128262191b core.substitute() for arrays (#2048) 2018-02-26 14:09:11 +01:00
Philippe Crama 463b7ef663 Adapt to path change of Newtonsoft.Json.dll from #2024 (see f0a15886) (#2034) 2018-02-21 11:46:03 +01:00
Richard Kuhnt f0a15886f2 Update validator.exe and shim.exe (#2024)
* Update Newtonsoft.Json and improve validator build process

* Improve shimexe build process and create deterministic builds
2018-02-20 18:48:02 +01:00
Richard Fussenegger b885ecf5ad Create sh shim (#1951)
* 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
2018-02-19 20:37:44 +01:00
Vladimir Chebotarev 81202f564f Added basic substitutions to bin::args attribute of the manifest. [#METR-21516] (#1986) 2018-02-06 18:02:23 +01:00
Richard Kuhnt 23d7168830 add head and tail part of version based on common format
See https://regex101.com/r/rNWldX/1
2018-02-04 14:11:17 +01:00
Richard Kuhnt d74e0a85b4 use normal variable instead of magic $matches variable name 2018-02-04 14:11:17 +01:00
comp500 0a25a6ae0e Prevent directory creation from being output (#1999) 2018-02-02 18:31:22 +01:00
Steve Baker 98bc5d6038 Enable writing to hidden .scoop file (#1978) (#1982) 2018-01-28 23:53:07 +01:00
Ross Smith II 76a38e2c6f Add multi-line support to pre/post_install (fixes #1890) (#1980)
* Add multi-line support to pre/post_install (fixes #1890)

* iex (@($p.._install) -join "`r`n")
2018-01-26 17:26:11 +01:00
Richard Kuhnt 83b823868f Improve Shortcut creation
* Solves #1319, #1320, #1378, #1757, #1846, #1867
* Add WorkingDirectory
* Add Icon
* Add Arguments
* Use FileInfo and DirectoryInfo
2018-01-08 17:15:48 +01:00