I didn't use the method of determining if the repo exists first, since we are supporting two repo scenarios, there may be a repo in {package}-cask format but it is not used to store the Cask.toml file, this patch uses a simpler method and supports more scenarios, see my test results for https://github.com/iawia002/casktest-cask repo:
Fetching github.com/iawia002/casktest formula...
Downloading https://github.com/iawia002/lux/releases/download/v0.14.0/lux_0.14.0_macOS_64-bit.tar.gz
[00:00:04] [###############################################################################################################################################################################################################] 13.79MiB/13.79MiB (3.41MiB/s, 0s)
The package 'github.com/iawia002/lux 0.14.0' has been installed!
Try run the command 'lux --help' to make sure it works!
Repo non-existent test:
Fetching github.com/iawia002/casktest1 formula...
It looks like the package does not support Cask
If you are the package owner, see our documentation for how to publish a package: https://github.com/axetroy/cask.rs/blob/main/DESIGN.md#how-do-i-publish-myothers-package
thread 'main' panicked at 'install package fail!: clone repository fail and exit code: 128
cc @axetroy I'll update the documentation if it's okay
close #4
I didn't use the method of determining if the repo exists first, since we are supporting two repo scenarios, there may be a repo in
{package}-cask
format but it is not used to store theCask.toml
file, this patch uses a simpler method and supports more scenarios, see my test results for https://github.com/iawia002/casktest-cask repo:Repo non-existent test:
cc @axetroy I'll update the documentation if it's okay