518 Commits

Author SHA1 Message Date
Richard Kuhnt fcabada1bc refactor(config): Redirect set_config output to Out-Null 2019-05-10 12:16:36 +02:00
Richard Kuhnt 9f4bc2a77f refactor(config): Better output for scoop config command 2019-05-10 12:16:36 +02:00
Richard Kuhnt 630ba04ecd fix(config): More tests for set_config 2019-05-10 12:16:36 +02:00
Richard Kuhnt 8ead07ffee refactor(alias): Apply config changes to scoop-alias command 2019-05-10 12:16:36 +02:00
Richard Kuhnt 4ec576a859 refactor(bin/libexec): remove config.ps1 imports 2019-05-10 12:16:36 +02:00
Richard Kuhnt 44975dce58 feature(update): Add hold/unhold command (#3444)
Allows un/locking a program to the current version and enable/disable updates.
Close #3232
Close #1941
2019-05-08 20:01:21 +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
Emil Sundin 9309b52640 scoop-cache: Display help on incorrect cache command (#3431) 2019-05-06 13:24:58 +02:00
Richard Kuhnt 42e4505089 refactor(core): Rename aria2 helper functions
aria2_path > Get-Aria2Path
aria2_installed > Test-Aria2Installed
aria2_enabled > Test-Aria2Enabled
2019-05-01 14:17:49 +02:00
Hsiao-nan Cheung e513430766 refactor(core): ensure_all_installed() to Confirm-InstallationStatus() (#3293) 2019-04-29 13:29:18 +02:00
Hsiao-nan Cheung a757dea15e refactor(cmd_available/Get-Command): Add Test-CommandAvailable function (#3314) 2019-04-28 18:53:00 +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 1a6fd6e396 feat: Check for LongPaths setting (#3387) 2019-04-26 18:37:18 +02:00
Chawye Hsu 19a1ab3e79 chore: add notification for new main bucket (#3392) 2019-04-26 18:21:43 +02:00
Chawye Hsu 404a6b82a6 fix(scoop-update): fix branch switching (#3372) (#3390)
fix(scoop-update): fix branch switching
2019-04-26 17:11:57 +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
Jakub Čábera f8c4d174a8 [buckets] Get back to if (#3351) 2019-04-21 20:48:26 +02:00
Jakub Čábera 4a2f3bbfe8 fix (#3350)
[Regression] Fix search after buckets optimize
2019-04-21 20:14:34 +02:00
Jakub Čábera 4463514948 [buckets] Optimize buckets function (#3341)
* Optimize buckets function
* Use Verb-Noun naming
* Add Show-DeprecatedWarning function to core
2019-04-21 13:02:19 +02:00
Jakub Čábera d8d1400bf0 uninstall: Add support for soft/purge uninstalling of scoop itself (#2781) 2019-03-25 13:55:49 +01:00
Jakub Čábera 16260a1267 [scoop-update] Fix update with cookies (#3261)
Fix typo.

- Closes se35710/scoop-java#43
- Closes se35710/scoop-java#42
- Closes se35710/scoop-java#38
- Closes se35710/scoop-java#39
- Closes se35710/scoop-java#41
- Closes #3250
2019-03-23 14:04:36 -04:00
Hsiao-nan Cheung abe84d5c5e scoop-cleanup: Fix '-k' to ignore using dl cache (#3223) 2019-03-18 12:02:41 +01:00
Jakub Čábera f552d40104 scoop-update.ps1: Download and verify files before update (#3148)
This is temporary solution for #2220 until whole install.ps1 refactor is done to make this tweak easily, in the best way one-liner.

- One step closer to #3149
- Closes #2220
- Closes #2343
- Closes #1605
2019-03-07 22:27:09 +01:00
Hsiao-nan Cheung f6a3819ac5 scoop-cleanup.ps1: Add param to cleanup outdated download cache (#3187)
* scoop-cleanup: Add param to cleanup outdated download cache

* Remove *.download when cleanup
2019-03-07 22:23:15 +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
Jakub Čábera 94dd94e411 scoop-list: Identify failed installation (#3140) 2019-02-19 18:36:18 +01:00
Hsiao-nan Cheung 3324b03c98 scoop-info.ps1: Fix dual license error in "scoop info" (#3125) 2019-02-16 20:15:22 +01:00
Jakub Čábera aa949625fc Uninstall: Print purge step to console (#3123)
Uninstall: Print purge step to console
2019-02-14 06:05:02 +01:00
Jakub Čábera 030a48b51c scoop-update.ps1: Checkout SCOOP_BRANCH if configured (#3063) 2019-02-01 18:20:08 +01:00
Jakub Čábera ec23179623 buckets: Move function into lib from lib-exec (#3062)
* buckets: Move function into lib from lib-exec

There is no reason to have it inside lib-exec since, it's all internal functions, which could be used inside other code

lib-exec scripts should be slimmed as possible, as they are only code runners with some validation

* Fix whitespace
2019-02-01 18:10:36 +01:00
Jakub Čábera cef2c6ec94 scoop-update.ps1: Use internal s/get_config function instead of scoop cmd (#3061)
This will prevent `Scoop is not recognized as internal command` when updating.
2019-02-01 18:08:56 +01:00
Chawye Hsu d23552a5a5 Rewritten data persisting feature (#2897)
**Data matters, please review**

This is a rework of #2891 #2890 and #2882 . This will also fix #2724 and fix #2900 , close #2779 

**Introduction**

I add a function called `unlink_persist_data($dir)`, which recursively unlink all junction/hard link in the given directory. This affects some sub-commands which have interaction with junction/hard link:

- `scoop-install`: the persisting logic has been improved as follow:
  1. if there are data in the `persist` folder, also in app(`source`) folder, rename that one located in app folder (e.g. app's default setting files) with a `original` suffix, then create link from `persist` to  app
  2. if there are data in the `persist` folder, but no in app(`source`) folder, just create link from `persist` to  app
  3. if there is no data in the `persist` folder (e.g. fresh install), but there are data in app(`source`) folder (e.g. app's default setting files), we will just use that default setting files as the first-time persisting. So move that files from app folder to `persist` folder, then create link from `persist` to  app
  4. But what if if there is neither data in the `persist` folder (e.g. fresh install), nor in the app(`source`) folder (e.g. setting files will be created after first startup, like `Everthing.db`). We need to create empty persisting target in the `persist` folder. But by default we can't know if a persisting target is a file or a directory (e.g. `conf.d`). So we create a directory by default, and to avoid this, manifest maintainers should use `pre_install` to manually create the source file before persisting.
- `scoop-reset`: `reset` command uses the logic of `install`, but there is a problem: before re-persisting data, there have been `junction/hard link` in the app(`source`) folder. It will throw an exception of file exists #2724 . To fix this, we should unlink all old link before re-persisting, using `unlink_persist_data`.
- `scoop-uninstall`: `Remove-Item` can not remove `NTFS junction`, we need to unlink all persistting data, before uninstalling/deleting an app, but keeping persisting data.
- `scoop-cleanup`: like `uninstall`, `Remove-Item` can not remove `NTFS junction`, we need to unlink all persistting data, before deleting old versions of an app. Before PR #2882 , it use `fsutil.exe` to unlink junction, which is not friendly to restricted users (#2832 and #2881 ).

Beyond the logic improvement, there is a new feature now: it supports sub-folder data persisting, like:

```json
{
    "homepage": "https://scoop.sh",
    "description": "A dummy manifest for scoop tests.",
    "license": "Freeware",
    "version": "1.1.0",
    "url": "https://get.scoop.sh",
    "pre_install": [
        "if (!(test-path \"$dir\\dummy.txt\")) { new-item -force \"$dir\\dummy.txt\" -itemtype file | out-null }",
        "if (!(test-path \"$dir\\dummydir\")) { new-item \"$dir\\dummydir\" -itemtype directory | out-null }",
        "if (!(test-path \"$dir\\subdir\")) { new-item \"$dir\\subdir\" -itemtype directory | out-null }",
        "if (!(test-path \"$dir\\subdir\\subdummydir\")) { new-item \"$dir\\subdir\\subdummydir\" -itemtype directory | out-null }",
        "if (!(test-path \"$dir\\subdir\\subdummy.txt\")) { new-item -force \"$dir\\subdir\\subdummy.txt\" -itemtype file | out-null }",
    ],
    "persist": [
        "dummy.txt",
        "dummydir",
        "subdir\\subdummydir",
        "subdir\\subdummy.txt"
    ]
}
```
So no need to strip directories of source for target anymore.

To participate in the code review and tests, go visit https://github.com/h404bi/scoop-persist-test for test cases.
2019-01-17 18:00:29 +01:00
Chawye Hsu f1dbdc16d2 scoop-search: add config.ps1 to load proxy settings (#2911) 2018-12-17 05:57:41 -08: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
Chawye Hsu e4e76d3a32 scoop-cleanup: handle with junction better (#2882)
* scoop-cleanup: handle with junction better

* scoop-cleanup: only resolve directory symbolic link

* scoop-cleanup: stop removing when an error occurs.
2018-12-13 21:22:16 -08:00
Pakorn Vongseela ed6b10ac08 Fixed persisting bug when force update app with same version. (#2774) 2018-12-05 16:13:33 -08:00
Jakub Čábera 4da8e3df5f Persist data on reset (#2773)
- Closs #2765
2018-11-29 00:10:35 -08:00
Chawye Hsu 7697ba4ba8 feature(scoop-info): support url manifest (#2538) 2018-08-27 16:51:18 +02:00
Richard Kuhnt 936cf9cbb0 Prevent installing programs from JSON multiple times (See #2535) 2018-08-27 11:29:40 +02:00
Richard Kuhnt 8c77bf7676 Add warning about aria2 usage to install/update commands 2018-08-07 20:11:38 +02:00
Richard Kuhnt 23ae5e348e Add default value to get_config() 2018-08-07 20:11:38 +02:00
Richard Kuhnt 38bdaec440 Use aria2c to support multi-connection downloads 2018-08-07 20:11:38 +02:00
Richard Kuhnt e8af15cc06 Store last update time as String (fixes #2239)
Prevents problems with PowerShell 5 and 6 using different methods to store dates in JSON
2018-08-07 19:56:43 +02:00
Chawye Hsu 3294ef724f scoop-info: Make manifest file path looks better (#2439)
scoop-info: Make manifest file path looks better
2018-07-26 05:36:58 +02:00
Chawye Hsu bff9824cf4 Improve scoop-info license attributes output (#2397) 2018-07-16 18:39:13 +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 2c99d828e5 scoop-info: show correct name for shim aliases (fixes #2259) 2018-05-14 20:52:30 +02:00
Chawye Hsu f641f7c8ad Scoop-info: improve output (#2257) 2018-05-13 13:20:28 +02:00
Richard Kuhnt 8c668b7b4d scoop-info: show env_set and env_add_path values 2018-05-04 22:31:35 +02:00