Commit Graph
547 Commits
Author SHA1 Message Date
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
Ross Smith II b22365733e Add subdirectories/arguments for shortcuts (#1945)
* Add support for subdirectories in shortcuts

* Add argument option to shortcuts
2018-01-08 17:10:02 +01:00
Ross Smith II af41fc6efb Update virustotal command (#1918)
- 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
2017-12-28 17:24:02 +01:00
Richard Kuhnt 609329bd2d Use fixed path to cmd.exe (#1921)
* Use fixed path to cmd.exe

* Use $env:COMSPEC instead of $env:WINDIR
2017-12-24 13:09:41 +01:00
Richard Kuhnt a9c2d4c486 If architecture isn't supported show an error on installation
https://github.com/lukesampson/scoop-extras/issues/678
2017-12-15 18:44:08 +01:00
Richard Kuhnt 36dc7a880c Allow more architecture naming conventions for --arch parameters
closes #1908
2017-12-15 17:05:12 +01:00
Richard Kuhnt da9c8e228a Use -Path instead of -InputStream parameter for Get-FileHash (closes #1905)
Fixes a problem with Get-FileHash not excepting -InputStream parameter in PowerShell 4.0
2017-12-12 21:39:52 +01:00
Richard Kuhnt da7d61f3e3 Use Get-FileHash instead of System.Security.Cryptography.HashAlgorithm (#1725)
* 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
2017-12-12 13:12:48 +01:00
Richard Kuhnt ef230c8b7b fix null reference error in strip_path() 2017-12-11 23:29:49 +01:00
Richard Kuhnt 897e7247a4 Add SourceForge Mode to autoupdate
* 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>
2017-11-19 23:04:44 +01:00
Richard Kuhnt 1ebad24647 Add $dashVersion substitution to autoupdate 2017-11-05 23:44:10 +01:00
Richard Kuhnt 637b7c163b Add regex support for RELEASES files created by Squirrel.Windows
See: https://github.com/Squirrel/Squirrel.Windows/blob/master/docs/getting-started/5-updating.md#distributing-the-new-release
2017-11-05 16:20:34 +01:00
Richard Kuhnt c15d8e2393 Fix a problem with persistent config files that get created on first startup
This prevents the creation of an empty directory if the file to persist doesn't exist on installation (e.g. config files getting created on first startup)
2017-10-26 20:02:28 +02:00
Richard Kuhnt 6380981b4c Prevent autoupdate from settings property to empty string
This prevents setting arch specific `extract_dir` properties to an empty string if there is no `extract_dir` in `autoupdate.architecture`
2017-09-28 20:30:40 +02:00
Richard Kuhnt af1e9ebdd3 Better error message if dependeny from another bucket couldn't be found (closes #1703) 2017-09-12 22:22:06 +02:00