diff --git a/cmd/root.go b/cmd/root.go index e69ab5c..976059b 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -105,8 +105,13 @@ var RootCmd = &cobra.Command{ } index, zipPath := handleArgs(input, version, serverDir, host) + zipPath, err := filepath.Abs(zipPath) + if err != nil { + log.Fatalln(err) + } + fmt.Printf("Installing %q from %q to %q\n", index.Name, zipPath, serverDir) - err := os.MkdirAll(serverDir, 0755) + err = os.MkdirAll(serverDir, 0755) if err != nil { log.Fatalln(err) } diff --git a/cmd/update.go b/cmd/update.go index 00a7dfb..9c31d83 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -6,6 +6,7 @@ import ( "github.com/nothub/mrpack-install/update/packstate" "github.com/spf13/cobra" "log" + "path/filepath" ) var ( @@ -60,6 +61,11 @@ var updateCmd = &cobra.Command{ index, zipPath := handleArgs(state.Slug, version, serverDir, host) + zipPath, err = filepath.Abs(zipPath) + if err != nil { + log.Fatalln(err) + } + update.Cmd(serverDir, dlThreads, dlRetries, index, zipPath, state) }, }