Commit Graph
331 Commits
Author SHA1 Message Date
linsui 9f693cbb7d fix(scoop-info): remove a whitespace (#3652) 2019-09-19 16:51:54 +02:00
linsui 6fc708cb25 fix(scoop-info): Fix output for single binaries with alias (#3651) 2019-09-19 12:36:20 +02:00
Jakub Čábera 0d251bafd1 fix(update,uninstall): Regression from Get-Process workaround (#3610)
https://github.com/lukesampson/scoop/pull/3608
2019-08-26 15:32:08 +02:00
Jakub Čábera f555968c39 fix(uninstall,update): Do not uninstall when application is running (#3608) 2019-08-23 20:09:18 +02:00
Eric Bouchard 78d2ff75f4 fix(help): Rename help() to scoop_help() (#3564)
When a user has an alias named `help`, the `scoop help` command does not work anymore.
To prevent collision with a user alias the function is renamed from `help` to `scoop_help`
2019-07-18 18:33:22 +02:00
Mark Huo 2d22ac8233 fix(config): show correct output when removing a config value (#3462) 2019-06-24 14:26:27 +02:00
Asif Mehedi 69a0843e9a Fix a small typo (#3512) 2019-06-17 23:16:17 -07:00
Chawye Hsu 16bdee060b fix(update): support changing scoop tracking repository (#3459)
Allows tracking of custom scoop fork:
```
$ scoop config SCOOP_REPO "https://github.com/<user>/scoop-fork"
$ scoop config SCOOP_BRANCH "patch-17"
$ scoop update
```
2019-05-13 21:01:45 +02:00
Richard Kuhnt d006fb9315 fix(update): Rewording PowerShell update notice 2019-05-12 11:39:06 +02:00
Richard Kuhnt 846311970f fix(checkup): Remove lessmsi and aria2 from scoop checkup command 2019-05-11 22:40:14 +02:00
Richard Kuhnt f578cd0767 feature(checkup): Add warnings to 'scoop checkup' for missing unpackers 2019-05-11 22:15:23 +02:00
Chawye Hsu f53ffc6c58 feat: support loading basedirs from config 2019-05-10 14:10:21 +02:00
Richard Kuhnt 7699beafc0 fix(config): Remove config.ps1 imports 2019-05-10 12:16:36 +02:00
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