File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file. The format
55## Changed
66- Parallelized update process
77- Simplified messages during the update process
8+ - Improved error messages
89# [ 0.9.1] - 2022-03-19
910## Changed
1011- Changed the message at the time of update was incorrect, so the message was corrected.
Original file line number Diff line number Diff line change @@ -83,10 +83,10 @@ func update(pkgs []goutil.Package, dryRun bool) int {
8383 updater := func (p goutil.Package , result chan updateResult ) {
8484 var err error
8585 if p .ImportPath == "" {
86- err = fmt .Errorf (" %s" , p .Name )
86+ err = fmt .Errorf (" %s is not installed by 'go install' (or permission incorrect) " , p .Name )
8787 } else {
8888 if err = goutil .Install (p .ImportPath ); err != nil {
89- err = fmt .Errorf (" %w: %s " , err , p .Name )
89+ err = fmt .Errorf (" %s %w " , p .Name , err )
9090 }
9191 }
9292
Original file line number Diff line number Diff line change @@ -151,10 +151,10 @@ func CanUseGoCmd() error {
151151// Install execute "$ go install <importPath>@latest"
152152func Install (importPath string ) error {
153153 if importPath == "command-line-arguments" {
154- return errors .New ("this is devel-binary copied from local environment" )
154+ return errors .New ("is devel-binary copied from local environment" )
155155 }
156156 if err := exec .Command ("go" , "install" , importPath + "@latest" ).Run (); err != nil {
157- return errors . New ("can't install " + importPath )
157+ return fmt . Errorf ("can't install %s: %w" , importPath , err )
158158 }
159159 return nil
160160}
You can’t perform that action at this time.
0 commit comments