46 Commits

Author SHA1 Message Date
z-Fng 3bee8159e0 fix(core): Fix substitute handling of substring keys (#6561) 2025-12-18 18:26:01 +08:00
Hsiao-nan Cheung ebd8c036fa chore(release): Bump to version 0.5.3 (#6257)
* fix (decompress): `Expand-7zipArchive` only delete temp dir / `$extractDir` if it is empty (#6092)

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

* refactor(download): Move download-related functions to 'download.ps1' (#6095)

* fix(download): Fallback to default downloader when aria2 fails (#4292)

* fix(commands): Handling broken aliases (#6141)

* fix(shim): properly check `wslpath`/`cygpath` command first (#6114)

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

* fix(scoop-bucket): Add missing import for `no_junction` envs (#6181)

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>

* docs(chglog): Update to 0.5.3 (#6258)

* perf(shim): Update kiennq-shim to v3.1.2 (#6261)

* fix(decompress): Replace deprecated 7ZIPEXTRACT_USE_EXTERNAL config (#6327)

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

* fix(scoop-uninstall): Fix uninstaller does not gain Global state (#6430)

* global arg

* changelog

* refactor(Get-Manifest): Select actual source for manifest (#6142)

* first step

* Revert "first step"

This reverts commit c5907c3e25.

* refactor(Get-Manifest): Select actual source for installed manifest

* rework sub-commands, `scoop-depends` is NOT working at this stage

* URI manifest

* opt

* deprecated manifest

* source of manifests

* source of manifest pt2

- Mark URI(path/URL/UNC/etc.) query as standalone manifest
- Drop `installed` and `available update` items for [query] and [installed] are different sources.

* remove variable preventing I forget it

* scoop-info: fix source of manifest on bucket

* fix `scoop-depends`

* Fix Standalone and Source detection

* fix global install

* Fix scoop-cat, scoop-home

- Query for remote manifest

* scoop-list: info +deprecated

* manifest: Fix first selected manifest

* gramma..

* Fix 61b3259

* length

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false (#6431)

* fix(scoop-depends-tests): Mocking `USE_EXTERNAL_7ZIP` as $false to avoding error when it is $true

* CHANGELOG

* feat(autoupdate): GitHub predefined hashes support (#6416)

* feat(autoupdate): predefined hash case for GitHub

- Remove `sha256:` prefix in `format_hash()`
- Add GitHub support in `get_hash_for_app()`

Close #6381

* doc(chglog): GitHub auto hash update

* fix(autoupdate): remove prefix only

* docs(CHANGELOG): Update to 0.5.3 (#6432)

* docs(CHANGELOG): Update to 0.5.3

* 6416

---------

Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Olav Rønnestad Birkeland <6450056+o-l-a-v@users.noreply.github.com>
Co-authored-by: kiennq <kien.n.quang@gmail.com>
Co-authored-by: HUMORCE <humorce@outlook.com>
Co-authored-by: Ryan <sitiom@proton.me>
Co-authored-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Bassel Rachid <101208715+basselworkforce@users.noreply.github.com>
Co-authored-by: Wordless Echo <wordless@echo.moe>
2025-08-11 00:38:38 +00:00
Chawye Hsu 36026f1804 feat(core): New cache filename format (#5929)
Signed-off-by: Chawye Hsu <su+git@chawyehsu.com>
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
2024-04-29 18:36:19 +08:00
Hsiao-nan Cheung 6772e61b3d refactor(core): Rewrite and separate path-related functions to system.ps1 (#5836) 2024-03-27 17:32:39 +08:00
Hsiao-nan Cheung 1630e5f908 tests(pester): Update to Pester 5 (#5222) 2022-10-28 13:14:29 +08:00
Hsiao-nan Cheung 7dcb7c0030 fix(tests): Fix tests in Linux and macOS (#5179) 2022-10-15 23:12:52 +08:00
Rashil Gandhi 7a599f062f feat(install): Add support for ARM64 architecture (#5154)
* Initial support for ARMv8

* Add fallback mechanism

* Update changelog

* Update useragent

* Some typo and format changes

* Use `env:ProgramFiles(Arm)` to detect ARM64

- Move `default_architecture()` to `core.ps1`

* Rename 'ensure_architecture()' and 'default_architecture()'

* Refactor 'supports_architecture()' to 'Get-SupportedArchitecture()'

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
2022-09-28 04:19:03 +05:30
Hsiao-nan Cheung 6296822f1f perf(scoop): Load libs only once (#4839) 2022-04-21 21:34:26 +08:00
Hsiao-nan Cheung 5a795caca5 refactor(reset_aliases): Move core function of reset_aliases to scoop (#4794) 2022-03-11 18:10:04 +08:00
HUMORCE 63b858c41f style: Use correct casing for $PSScriptRoot (#4775) 2022-03-04 22:55:45 +08:00
Hsiao-nan Cheung b2a27f420d fix(shim-test): Remove unused shim files (#4726) 2022-02-09 19:01:33 +08:00
Hsiao-nan Cheung 285ffd0322 fix(no-junction): Fix error when 'NO_JUNCTIONS' is been set (#4722) 2022-02-09 11:08:56 +08:00
Hsiao-nan Cheung 271d41b949 style(test): Format scripts by VSCode's PowerShell extension (#4609) 2021-12-30 09:37:40 +08:00
Rashil Gandhi ef4349bee4 feat(shim): Rework shimming logic (#4543)
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
2021-12-02 21:23:36 +08:00
Richard Kuhnt 7699beafc0 fix(config): Remove config.ps1 imports 2019-05-10 12:16:36 +02:00
Richard Kuhnt 010546cf26 refactor(core): Combine helpers to Get-HelperPath and Test-HelperInstalled 2019-05-01 14:17:49 +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 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
Vladimir Chebotarev da64301b8b [core] Allowed underscores in package names. (#2930)
* Allowed underscores in package names.

* Added tests for underscores in package names.
2019-02-22 19:12:48 +01:00
Kevin Marquette 9d6c02ac68 Use pester 4.0 syntax in core tests (#2712) 2018-10-29 14:58:29 +01:00
Richard Kuhnt c0295f0ae0 appveyor: Run tests for PowerShell 5 and 6 (#2603)
- Adds `!linter` commit flag to skip PSScriptAnalyzer
- Adds `!manifests` commit flag to skip manifest validation
- Skips manifest validation if no JSON has changed
- Skips tests and linting if no PowerShell script has changed
- Validates only manifests that changed
- Validates all manifests if `schema.json` changed
2018-09-18 18:37:43 +02:00
Leon Yu 9bc7d5f8b3 Fix .ps1 shim parsing logic due to prior PR (#2564)
Due to my prior PR #2562 which changed the content of .ps1 shims, the code that attempts to warn about shims being overwritten no longer detects app name correctly. This is to correct that.
2018-09-07 16:25:37 +02:00
Richard Kuhnt ff9c0c3daf parse_app(): fix for relative paths 2018-05-07 14:18:40 +02: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
Chawye Hsu e1bb1e91d0 Lint: PSAvoidUsingCmdletAliases (#2075) 2018-03-03 18:41:19 +01:00
Richard Kuhnt 872517b898 Update tests to work with pester version 4.* (#1711)
* Remove custom choco options
* Use Install-Module to install Pester
2017-11-27 15:27:38 +01:00
Richard Kuhnt 641dd70011 Fix unzip_old test 2017-05-31 00:50:15 +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 4f4e5d18d7 Skip tests heavily relying on robocopy and windows paths 2017-05-27 17:18:14 +02:00
Rémy 0fff49f89e create test file for install / add test for env_add|rm_path 2017-04-03 18:40:06 +02:00
Rémy 357b33ddfe persist file support 2017-03-25 16:28:06 +01:00
Rémy c9f4ddf219 implement persist definition and tests 2017-03-25 16:28:05 +01:00
Simon Hartcher 3bcdce409b Support for scoop install <bucket>/<app>
- TODO: support install of same name apps from different buckets?
2016-01-24 22:35:43 +11:00
Roy Ivy III 2453136312 fix Scoop-Core tests for Win10 (#hack)
* fixes tests by coercing the `test-unzip` return value back into a valid path string
* fixes #476

.# Discussion

For Win10 machines, `test-unzip` returns a bugged value, causing test failures.

Investigation shows that the combination of Pester, COM (used within unzip_old), and
Win10 leads to the odd/bugged return value. The return value contains the correct
string, but it is prefaced with a leading space which arises de-novo during the
execution return process from `test-unzip`. The value is correct and usable at the end
of `test-unzip` but is bugged upon receiving the value at the caller. Removing the COM
call from within `unzip_old` or using a Windows version earlier than Win10 fixes the
problem, but are obviously not useful as solutions.

Given the nature of the returned value and COM involvement, the real problem is likely
stack corruption. But it's not clear whether the issue is with Pester, Win10/PowerShell,
or possibly even some subtle bug within unzip_old.

This, admittedly hacky, coercion fixes the problem for all Windows versions and also
keeps Appveyor satisfied.
2015-08-26 18:02:31 -05:00
Roy Ivy III 5200dc280e fix/improve Scoop-Alias and Scoop-Core tests
* Scoop-Alias: remove erroneous output from dot-sourcing the source file
* Scoop-Alias: using "TestDrive:\" for mocked shimdir
  - reduced cleanup
  - improved robustness; excution is now independent of CWD
* Scoop-Core: corrected directory location code
  - improved robustness; execution is now independent of CWD
2015-08-25 22:45:21 -05:00
Simon Hartcher 371c15ea77 Add test for sanitary_path 2015-07-24 14:10:01 +10:00
Simon Hartcher 69d6175bbe Mock versiondir when running robocopy test 2015-05-31 14:43:24 +10: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 23a39252aa Fix shim tests failing when shimdir is not in path 2015-04-12 22:44:57 +10:00
Simon Hartcher 49bd9b637d Add tests for shim
Refactored rm_shims into two functions rm_shims and rm_shim
Added tests for shim and rm_shim
Added test for quote in username (#196)
2015-04-12 21:15:50 +10:00
Simon Hartcher e8ed3fc2e3 Change setup_working to use %TEMP% 2015-04-12 12:12:14 +10:00
Simon Hartcher 3a2adf9c3d Migrate old tests to Pester
Migrate unzip_old tests to pester
Migrate packages tests to Pester
Migrate opts.ps1 to Pester
Migrate tests to use Pester idiomatic tests
Move tests.ps1 to Scoop-TestLib.ps1
2015-04-12 12:11:03 +10:00
Simon Hartcher fb074f2c63 Remove unneeded scripts
Old movedir test
invoke-build script
2015-04-12 12:09:18 +10:00
Simon Hartcher 558e6eced1 Implement testing using Pester
Integrate with AppVeyor
2015-04-12 12:08:08 +10:00