Skip to content

Commit

Permalink
feat: search and install commands to automatically install the plug-i…
Browse files Browse the repository at this point in the history
…n, if not installed locally.
  • Loading branch information
aooohan committed Apr 10, 2024
1 parent f8de753 commit 04d839a
Show file tree
Hide file tree
Showing 30 changed files with 132 additions and 2,294 deletions.
5 changes: 2 additions & 3 deletions cmd/commands/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package commands

import (
"fmt"
"github.com/urfave/cli/v2"
"github.com/version-fox/vfox/internal"
"strings"
Expand Down Expand Up @@ -51,9 +50,9 @@ func installCmd(ctx *cli.Context) error {
name = strings.ToLower(argArr[0])
version = ""
}
source, err := manager.LookupSdk(name)
source, err := manager.LookupSdkWithInstall(name)
if err != nil {
return fmt.Errorf("%s not supported, error: %w", name, err)
return err
}
return source.Install(version)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/commands/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func searchCmd(ctx *cli.Context) error {
}
manager := internal.NewSdkManager()
defer manager.Close()
source, err := manager.LookupSdk(sdkName)
source, err := manager.LookupSdkWithInstall(sdkName)
if err != nil {
return fmt.Errorf("%s not supported, error: %w", sdkName, err)
}
Expand Down
1 change: 0 additions & 1 deletion docs/.vitepress/cache/deps/@theme_index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/.vitepress/cache/deps/@theme_index.js.map

Large diffs are not rendered by default.

29 changes: 10 additions & 19 deletions docs/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,49 @@
{
"hash": "c44299a9",
"hash": "96004987",
"configHash": "b25d5b92",
"lockfileHash": "eff6125a",
"browserHash": "4861eb3f",
"lockfileHash": "16b0c1ce",
"browserHash": "204f4453",
"optimized": {
"vue": {
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "d1bb3707",
"fileHash": "68d2c152",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "c819d541",
"fileHash": "0e500d10",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "d3a2931b",
"fileHash": "340cba74",
"needsInterop": false
},
"vitepress > @vueuse/integrations/useFocusTrap": {
"src": "../../../node_modules/@vueuse/integrations/useFocusTrap.mjs",
"file": "vitepress___@vueuse_integrations_useFocusTrap.js",
"fileHash": "5acf36a8",
"fileHash": "ed87f9b6",
"needsInterop": false
},
"vitepress > mark.js/src/vanilla.js": {
"src": "../../../node_modules/mark.js/src/vanilla.js",
"file": "vitepress___mark__js_src_vanilla__js.js",
"fileHash": "763a016f",
"fileHash": "664db382",
"needsInterop": false
},
"vitepress > minisearch": {
"src": "../../../node_modules/minisearch/dist/es/index.js",
"file": "vitepress___minisearch.js",
"fileHash": "20b60ae3",
"fileHash": "c3ca8272",
"needsInterop": false
},
"@theme/index": {
"src": "../../../node_modules/vitepress/dist/client/theme-default/index.js",
"file": "@theme_index.js",
"fileHash": "425c8599",
"needsInterop": false
},
"axios": {
"src": "../../../node_modules/axios/index.js",
"file": "axios.js",
"fileHash": "f47f47ab",
"fileHash": "e89a1f77",
"needsInterop": false
}
},
Expand All @@ -59,9 +53,6 @@
},
"chunk-Z6B2QTD3": {
"file": "chunk-Z6B2QTD3.js"
},
"chunk-CSAU5B4Q": {
"file": "chunk-CSAU5B4Q.js"
}
}
}
Loading

0 comments on commit 04d839a

Please sign in to comment.