nothub / mrpack-install

Modrinth Modpack server deployment
https://pkg.go.dev/github.com/nothub/mrpack-install
MIT License
128 stars 9 forks source link

-v / --verbose No longer in help and no longer works #48

Closed Routhinator closed 3 months ago

Routhinator commented 3 months ago

I am trying to use this to update a pack I've been managing with it and there is a 404 for one of the mods or mod updates. Problem is, this is all I get:

mc@mineos_server:~/servers/CobblemonPlus$ /var/games/minecraft/util/mrpack-install-linux install 'Cobblemon Fabric Plus 1.4.1-plus-1.0.5.mrpack' --server-dir "${PWD}"
2024/05/17 18:50:20 http status 404

I can't tell what the mod or file is thats throwing a 404, and so i can't fix it. This is where the verbose mode mentioned in the repo docs would be needed, however in the most recent version, verbose is no longer an option:

mc@mineos_server:~/servers/CobblemonPlus$ /var/games/minecraft/util/mrpack-install-linux --version                                                                                     
mrpack-install v0.16.10
mc@mineos_server:~/servers/CobblemonPlus$ /var/games/minecraft/util/mrpack-install-linux --help   
Deploys a Modrinth modpack including Minecraft server.

Usage:
  mrpack-install (<filepath> | <url> | <slug> [<version>] | <id> [<version>]) [flags]
  mrpack-install [command]

Examples:
  mrpack-install https://example.org/data/cool-pack.mrpack
  mrpack-install downloads/cool-pack.mrpack --proxy socks5://127.0.0.1:7890
  mrpack-install hexmc-modpack --server-file server.jar
  mrpack-install yK0ISmKn 1.0.0-1.18 --server-dir mcserver
  mrpack-install communitypack9000 --host api.labrinth.example.org
  mrpack-install --version

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  ping        Ping a Labrinth instance
  server      Prepare a plain server environment
  update      Update the deployed modpack
  version     Print version infos

Flags:
      --download-threads int   Download threads (default 8)
  -h, --help                   help for mrpack-install
      --host string            Labrinth host (default "api.modrinth.com")
      --proxy string           Use a proxy to download
      --retry-times int        Number of retries when a download fails (default 3)
      --server-dir string      Server directory path (default "mc")
      --server-file string     Server jar file name
  -V, --version                Print version and exit

Use "mrpack-install [command] --help" for more information about a command.
mc@mineos_server:~/servers/CobblemonPlus$ /var/games/minecraft/util/mrpack-install-linux install 'Cobblemon Fabric Plus 1.4.1-plus-1.0.5.mrpack' --server-dir "${PWD}" --verbose       
Error: unknown flag: --verbose
Usage:
  mrpack-install (<filepath> | <url> | <slug> [<version>] | <id> [<version>]) [flags]
  mrpack-install [command]

Examples:
  mrpack-install https://example.org/data/cool-pack.mrpack
  mrpack-install downloads/cool-pack.mrpack --proxy socks5://127.0.0.1:7890
  mrpack-install hexmc-modpack --server-file server.jar
  mrpack-install yK0ISmKn 1.0.0-1.18 --server-dir mcserver
  mrpack-install communitypack9000 --host api.labrinth.example.org
  mrpack-install --version

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  ping        Ping a Labrinth instance
  server      Prepare a plain server environment
  update      Update the deployed modpack
  version     Print version infos

Flags:
      --download-threads int   Download threads (default 8)
  -h, --help                   help for mrpack-install
      --host string            Labrinth host (default "api.modrinth.com")
      --proxy string           Use a proxy to download
      --retry-times int        Number of retries when a download fails (default 3)
      --server-dir string      Server directory path (default "mc")
      --server-file string     Server jar file name
  -V, --version                Print version and exit

Use "mrpack-install [command] --help" for more information about a command.

Unsure if this was mistakenly removed or intentionally removed, but we need to be able to have more info than 2024/05/17 18:50:20 http status 404 to diagnose issues with packs.

FWIW - ATLauncher can install this version update with no errors, no 404s occur.

nothub commented 3 months ago

Hi, thanks for your report.

From what I can tell, the error happens because install is not an available sub-command and thus, the tool wrongly tries to resolve it as filepath, URL or modrinth project id or slug and then fails with this very unsuitable error message.

Please try the following command:

/var/games/minecraft/util/mrpack-install-linux 'Cobblemon Fabric Plus 1.4.1-plus-1.0.5.mrpack' --server-dir "${PWD}"
nothub commented 3 months ago

To make the underlying issue more clear, I will add additional log messages in the next release.

nothub commented 3 months ago

With the additional log messages added in 830cebb04ca41c94f12ca665cef2ce1c67fb3de8, the log output for this situation will look like this in the future:

Trying to resolve project id or slug: install
http status 404
Routhinator commented 3 months ago

Doh, ok got myself turned around then. I guess I'll have to see if the original issue i hit with the update command comes up again.