60 Commits

Author SHA1 Message Date
Chawye Hsu 1f0f687a39 chore(installer): Drop the old installer (#5186)
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
2022-10-14 14:56:05 +08:00
Jules 122fdc1a1c refactor(download): Rename dl() to Invoke-Download() (#5143) 2022-09-16 10:36:40 +08:00
Hsiao-nan Cheung 08ecdd16a8 fix(config): Change config option to snake_case in file and SCREAMING_CASE in code (#5116) 2022-08-21 19:51:31 +08:00
yi_Xu ec04dd07bc feat(scoop-(un)hold): Support scoop (un)hold scoop (#5089)
* feat(scoop-config): Add new configuration of `SCOOP_HOLD`

Allow to disable Scoop itself updates.
This configuration have the same function with 'scoop (un)hold scoop'.

* perf(scoop-update): Separate `update_bucket` from `update_scoop`

* perf(scoop-(un)hold): remove big overarching if-statement

* perf(scoop-config): use `SCOOP_HOLD_DAYS` instead of `SCOOP_HOLD`

* perf(scoop-config): Update forward Compatible code

* Update libexec/scoop-config.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-hold.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-unhold.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* perf(scoop-update): Update last_scoop_update

* docs(changelog): update changelog to add feature

* fix(changelog): fix changelog typo

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-config.ps1

Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>

* refactor: Use `lastUpdate` instead of `lastupdate`

Consistent with scoop-export.

* fix(install): make config lastUpdate silent

* refactor(scoop-update): Remove `SCOOP_HOLD`

* fix: update changelog

remove none used code.

* Update lib/core.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* Update libexec/scoop-update.ps1

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>

* perf(scoop-update): Handle the judgment in try-catch

* fix(scoop-update): Remove 'update_until' when update scoop itself

* Update lib/core.ps1

Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>

* docs(CHANGELOG): Update changelog

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>
2022-08-11 14:50:40 +05:30
Hsiao-nan Cheung 7d5a47cc77 fix(install): Use 'Get-Command' to test scoop install status (#4785) 2022-03-08 21:00:58 +08:00
Hsiao-nan Cheung e4580dd705 feat(scoop-shim): Add scoop shim to manipulate shims (#4736) 2022-02-26 22:32:54 +08:00
Rashil Gandhi b174775b71 chore: capitalize to prevent redirect (#4483) 2021-10-28 14:51:07 -07:00
Ross Smith II 5226f26f18 chore: s/lukesamson/ScoopInstaller in install.ps1 2021-10-25 18:28:51 -07:00
Xiang ZHU eb3d42de8f fix(install): execution policy check (#3619)
fix #3590
2019-10-18 19:16:33 +02:00
3e55a70971 docs(readme): Improve installation instructions (#3600) 2019-09-02 13:38:30 +02:00
Richard Kuhnt 8beffc4329 Sync renaming changes to develop 2019-05-06 18:19:57 +02:00
Richard Kuhnt f1f86494d7 Incorporate organization and bucket renaming
See: https://github.com/lukesampson/scoop/issues/3437
2019-05-06 18:18:16 +02:00
Hsiao-nan Cheung fe1a91e699 PowerShell: Update requirement to version 5 or greater (#3330) 2019-04-28 18:37:21 +02:00
Jakub Čábera 56d54d1c91 feature: Prepare extraction of main bucket (#3060)
- Add preparing changes for extracting the main bucket to https://github.com/scoopinstaller/scoop-main
- Download main bucket on installation
- Add check_main_bucket function
- Add main bucket to buckets.json
- Add docker-compose.yml with default debugging image
- Remove old TODOs
- Refactor bucketdir -> Find-BucketDirectory
- Remove redundant .vscode settings
2019-04-24 21:08:53 +02:00
Hsiao-nan Cheung 5f91682a79 decompress.ps1: Refactored (w/ install.ps1, core.ps1) (edited) (#3169)
* decompress.ps1: Refactored (w/ install.ps1, core.ps1)

* fix install.ps1
2019-03-07 22:14:06 +01:00
Richard Kuhnt 38e346d380 install.ps1: replace raw.github.com with raw.githubusercontent.com
closes #3142
2019-02-19 22:08:11 +01:00
Richard Kuhnt 7ba87d5aea bin\install.ps1: rename unzip to extract_zip (closes #3074)
- Fix bug introduced with https://github.com/lukesampson/scoop/commit/39136fc6fedcce91255d082706655bb3a111903a
2019-02-03 17:44:31 +01:00
Jun Ueoka f23b2bbde5 install.ps1: Fix lastupdate config value after scoop installation (#2919)
Related to #2906
2018-12-20 18:46:09 +01:00
Jun Ueoka 79a0d3b768 core/update: Scoop updates itself automatically for the first time after fresh install (#2907)
Fixes #2906
2018-12-16 13:16:48 +01:00
Richard Kuhnt a3cae34b13 Fix ExecutionPolicy regression introduced with #2703 2018-10-27 22:48:31 +02:00
Ben Dang 1d27f264b7 Fix the check for ExecutionPolicy scope (#2703)
Under certain terminals like cmder, `Get-ExecutionPolicy` will show the scope of `Process`.  This fix explicitly checks the scope of `CurrentUser`.

Signed-off-by: Ben Dang <me@bdang.it>
2018-10-25 17:45:14 +02:00
Richard Kuhnt e52c24c94e Add .NET 4.5 check to scoop install script (See #2487) 2018-08-20 15:07:18 +02:00
xeijin 0d4312370b Reset $errorActionPreference to original value (#2489)
For AppVeyor CI the `$errorActionPreference` setting is persisting after I install scoop, subsequently causing issues with installing scoop apps (e.g. failing the whole build because an installer executable outputs what looks like an error).
2018-08-11 20:47:28 +02: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
Richard Kuhnt 044b168fe6 Avoid using cmdlet aliases in installer script 2017-09-12 21:46:20 +02:00
Richard Kuhnt 141aa3df95 Add PowerShell 3 warning to scoop installer script
`#requires -v 3` doesn't get evaluated by running `iex` on the downloaded script.
Related issues #1700, #1524, #1462
2017-09-12 21:38: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
Luke Sampson 1c173bc56d Use sentence case for UI messages. 2017-02-13 20:20:41 +11:00
Luke Sampson f5cbae7707 Check the effective execution policy rather than limit to current scope, in case it is defined for the machine and not the user (see #1221) 2017-01-23 09:55:22 +11:00
Luke Sampson 1340a762f6 allow and recommend 'RemoteSigned' execution policy (see #1221) 2017-01-23 09:50:31 +11:00
Mikhail-T cc37f6e335 improved message 2016-12-25 17:42:07 -06:00
Mikhail-T 4aebd39d8b show message only if execution policy is not set 2016-12-25 17:28:01 -06:00
Mikhail-T 566608b695 confirm making execution policy change 2016-12-25 16:57:38 -06:00
Mikhail-T 03c9f4e1f3 removed trailing spaces 2016-12-24 21:08:26 -06:00
Mikhail-T 73a2fcae35 set execution policy on scoop install
I've tested this by running updated script as below:
```iex (new-object net.webclient).downloadstring('https://gist.githubusercontent.com/mikhail-tsennykh/f65a3addf22b36681b1eb7c6d708bed2/raw/4040fe0c156512a63b1dcfea2fd5595b26e1a1f1/scoop%2520auto%2520set%2520execution%2520policy%2520test')```

nice to skip extra step (unless there is some good reason not to do it on scoop install).
2016-12-24 21:03:53 -06:00
Luke Sampson b30afe650d don't terminate Powershell session when calling install with invoke-expression (see #980) 2016-08-15 07:10:33 +10:00
Roy Ivy III 6d9bca805f whitespace cleanup
* makes changes to almost all main repo files to be in accordance with .editorconfig
* some files in "test\fixtures\..." were left alone to avoid breaking tests
* NOTE: whitespace changes *only* (`git diff -b` shows no changes)
2015-08-17 22:54:43 -05:00
Simon Hartcher 1a2db05366 Fix #376 Robocopy is not always in PATH
Add ensure_robocopy_in_path method to core.ps1 which checks if
robocopy is available, then shims it if not.
2015-05-30 17:53:41 +10:00
Simon Hartcher 24347c2afb Revert "Add ability to reset scoop (also adds Git Bash support)" 2015-05-10 12:05:11 +10:00
Simon Hartcher 5cdc47214a Add .bashrc generation to install script
Fixes #354
2015-05-09 23:38:32 +10:00
Simon Hartcher ed3972ee75 Removed unused timestamp code 2015-04-04 14:58:04 +11:00
Luke Sampson 32dc679ec9 add MSI extraction, deprecate MSI install (see issues #16, #18) 2013-12-23 11:20:54 +10:00
Luke Sampson 634464e3de simpler, faster unzip (5x speedup, see #35) 2013-12-02 12:33:40 +10:00
Luke Sampson 555e189d33 beginning refactoring for global installs 2013-08-30 16:58:20 +10:00
Luke Sampson 7ccaf2b1cd fix bug in install trying to write last_updated, remove shims one-by-one when uninstalling apps so they aren't left around to cause strange errors when another app dir can't be deleted later down the line 2013-08-15 15:05:19 +10:00
Luke Sampson 7382e17561 convert spaces to tabs 2013-08-15 13:05:00 +10:00
Luke Sampson 6579adf365 remember when scoop was last updated and report this in 'scoop status' 2013-08-05 16:43:59 +10:00
Luke Sampson f1d67b5eec for install, don't call abort if invoked with iex, because that will kill the ps session 2013-08-02 09:34:46 +10:00
Luke Sampson 79c76be6fe add #requires -v 3 to install and scoop 2013-06-29 10:39:58 +10:00
Luke Sampson 9f4be7d3cd rename 'bin stubs' to 'shims' 2013-06-27 15:42:58 +10:00