Commit Graph
250 Commits
Author SHA1 Message Date
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
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
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
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 12962acfa8 Use consistent User-Agent Header on all webrequests 2018-03-18 16:35:01 +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
Vladimir Chebotarev a9277710ee Added exclusion for sourceforge. [#METR-21516] (#2109) 2018-03-10 23:37:14 +01:00
Chawye Hsu e1bb1e91d0 Lint: PSAvoidUsingCmdletAliases (#2075) 2018-03-03 18:41:19 +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
comp500 0a25a6ae0e Prevent directory creation from being output (#1999) 2018-02-02 18:31:22 +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 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 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 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
Dave Andersen 330fcaf93e fix #1628 (scoop update --ignore-cache option broken) (#1629)
* fix #1628

* remove unintended change in merge

* Add --no-cache to install and to all parts of the update command
2017-09-01 22:47:11 +02:00
Richard Kuhnt 5af29e1b25 Add script to un/installer property
Allow custom installer and uninstaller scripts without creating/downloading *.ps1 files (could also be used to clean-up post_install and pre_install scripts)
2017-08-21 12:52:22 +02:00
Luke Sampson c8a5622196 Fix 'Access denied' error on current directory when resetting. 2017-07-31 14:23:50 +10:00
Richard Kuhnt e67d176d95 Change environment variables to uppercase 2017-05-31 00:27:21 +02:00
Richard Kuhnt f737315e73 Merge pull request #1517 from lukesampson/unix-compatible
[WIP] Add Unix compatibility (for maintenance jobs and manifest testing)
2017-05-30 21:59:15 +02:00
Luke Sampson 887f041fc7 Extract to _tmp instead of _scoop_extract to conserve 10 more characters in path. 2017-05-29 17:59:09 +10:00
Richard Kuhnt 24fd3a3c7e Move unix compatible functions to unix.ps1
- Change helper functions to snake_case
2017-05-28 13:59:42 +02:00
Richard Kuhnt 9128eeab13 Fix variable in set_https_protocols 2017-05-28 13:41:58 +02:00
Richard Kuhnt d97d02e57f Fix checksum calculations for MacOS
MacOS provides shasum instead of sha256sum
2017-05-27 17:09:47 +02:00
Richard Kuhnt d28cf794cc Add isUnix/isLinux/isMacOS helper functions 2017-05-27 17:07:36 +02:00
Richard Kuhnt a8de45f214 Use write-output instead of echo 2017-05-27 13:15:34 +02:00
Richard Kuhnt 2abd22223d Use sha256sum and friends for hash calculation 2017-05-24 21:52:16 +02:00
Richard Kuhnt 75ea431922 Make core.ps1 and install.ps1 able to run on unix 2017-05-24 19:59:24 +02:00
Richard Kuhnt 884a7a3361 Allow architecture specific shortcuts for special cases like dont-sleep or mpc-hc 2017-05-23 22:28:49 +02:00
Richard Kuhnt 92ab8f5e80 Move some functions to core.ps1 2017-05-14 04:54:32 +02:00
Richard Kuhnt 14a461296b Allow fosshub.com as download source 2017-05-13 18:27:52 +02:00
Simon Hartcher 9f594ebe9a Merge pull request #1418 from rrelmy/tests
[WIP] Add more unit tests
2017-05-04 12:33:45 +10:00
Silver Zachara 7bf823186c Quote source and target paths
Prevent failure, when path contains whitespaces
2017-05-03 20:15:35 +02:00
Richard Kuhnt a66ae9626f Allow $dir, $original_dir and $persist_dir variables in manifest notes 2017-04-25 19:19:09 +02:00
Luke Sampson 5841a704b2 Don't make 7-zip an install dependency if it's already installed (fixes #1438) 2017-04-19 19:43:39 +10:00
Sergey 9af3e46847 FTP SIZE request
Came across this when tried to install zip.
ContentLength is -1 when downloading from their server.
2017-04-15 22:41:15 +03:00
Simon Hartcher 836f03db72 Merge pull request #1332 from lukesampson/install-specific-version
Installing specific versions using autoupdate feature
2017-04-05 16:07:27 +10:00
Rémy ade8d51423 use join-path in env_(add|rm)_path 2017-04-03 17:40:12 +02:00
Rémy 7410b94848 fix env_add_path regression (#1417) 2017-04-03 17:30:08 +02:00
Rémy 5053c41bf0 Merge branch 'master' into install-specific-version 2017-04-02 22:10:50 +02:00
Simon Hartcher 2b96081c21 Merge branch 'master' into install-specific-version 2017-03-31 18:43:23 +11:00
Rémy e7814ea295 remove $persist_dir from env 2017-03-30 18:28:10 +02:00
Luke Sampson 70a9f9a6b8 Suggested persist changes (see #1410) 2017-03-30 15:14:20 +11:00