File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -879,25 +879,19 @@ export default class Package {
879879 // perform update
880880 process . stdout . write ( "Updating dependencies ... " ) ;
881881
882- res = childProcess . spawnSync ( "npm update --json" , {
883- "cwd" : this . root ,
884- "stdio" : [ "ignore" , "pipe" , "ignore" ] ,
885- "shell" : true ,
886- } ) ;
887-
888- // update failed
889- if ( res . status ) {
890- console . log ( ansi . error ( " ERROR " ) ) ;
891-
892- const output = JSON . parse ( res . stdout ) ;
882+ res = await this . npm . api . exec ( "update" ) ;
893883
894- console . log ( output . error . summary ) ;
895- console . log ( output . error . detail ) ;
896-
897- return result ( 500 ) ;
884+ if ( res . ok ) {
885+ console . log ( ansi . ok ( " OK " ) ) ;
898886 }
899887 else {
900- console . log ( ansi . ok ( " OK " ) ) ;
888+
889+ // update failed
890+ console . log ( ansi . error ( " ERROR " ) ) ;
891+ console . log ( res . data . error . summary ) ;
892+ console . log ( res . data . error . detail ) ;
893+
894+ return res ;
901895 }
902896
903897 // commit and push
You can’t perform that action at this time.
0 commit comments