Reword "mod"/"addon"/"install" to clearer terms across all commands (fixes #138)

This commit is contained in:
comp500
2023-01-20 18:39:23 +00:00
parent eee067964a
commit 79d3ed3957
11 changed files with 57 additions and 67 deletions

View File

@@ -12,17 +12,11 @@ import (
// openCmd represents the open command
var openCmd = &cobra.Command{
Use: "open",
// TODO: change semantics to "project" rather than "mod", as this supports texture packs and misc content as well?
Short: "Open the project page for a curseforge mod in your browser",
Use: "open [name]",
Short: "Open the project page for a CurseForge file in your browser",
Aliases: []string{"doc"},
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
if len(args[0]) == 0 {
fmt.Println("You must specify a mod.")
os.Exit(1)
}
fmt.Println("Loading modpack...")
pack, err := core.LoadPack()
if err != nil {
@@ -36,8 +30,8 @@ var openCmd = &cobra.Command{
}
resolvedMod, ok := index.FindMod(args[0])
if !ok {
// TODO: should this auto-refresh???????
fmt.Println("You don't have this mod installed.")
// TODO: should this auto-refresh?
fmt.Println("Can't find this file; please ensure you have run packwiz refresh and use the name of the .pw.toml file (defaults to the project slug)")
os.Exit(1)
}
modData, err := core.LoadMod(resolvedMod)
@@ -47,7 +41,7 @@ var openCmd = &cobra.Command{
}
updateData, ok := modData.GetParsedUpdateData("curseforge")
if !ok {
fmt.Println("This mod doesn't seem to be a curseforge mod!")
fmt.Println("Can't find CurseForge update metadata for this file")
os.Exit(1)
}
cfUpdateData := updateData.(cfUpdateData)