Skip to content

Commit

Permalink
More log messages for reading input arg
Browse files Browse the repository at this point in the history
  • Loading branch information
nothub committed May 18, 2024
1 parent 20549fc commit 830cebb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,18 +178,20 @@ func handleArgs(input string, version string, serverDir string, host string) (*m

archivePath := ""
if web.IsValidHttpUrl(input) {
log.Println("Downloading mrpack file from", input)
log.Printf("Downloading mrpack file from: %s", input)
file, err := web.DefaultClient.DownloadFile(input, serverDir, "")
if err != nil {
log.Fatalln(err.Error())
}
archivePath = file

} else if files.IsFile(input) {
log.Printf("Installing from mrpack file: %s", input)
archivePath = input

} else {
// input is project id or slug
log.Printf("Trying to resolve project id or slug: %s", input)

versions, err := modrinth.Client.GetProjectVersions(input, nil)
if err != nil {
log.Fatalln(err)
Expand Down

0 comments on commit 830cebb

Please sign in to comment.