@@ -13,6 +13,11 @@ function howToInstallElmFormat(){
1313 return 'You can download Elm format here https://github.com/avh4/elm-format#installation-\n'
1414}
1515
16+ function displayHintForNonUpgradedPackage ( packageName ) {
17+ process . stdout . write ( `WARNING: ${ packageName } has not been upgraded to 0.18 yet!\n` ) ;
18+ process . stdout . write ( `WARNING: You can make an issue for 0.18 upgrade here: https://github.com/${ packageName } \n` )
19+ }
20+
1621function findBinary ( name , message ) {
1722 try {
1823 var binary = which . sync ( name ) ;
@@ -96,16 +101,17 @@ function main(knownUpgrades) {
96101 }
97102
98103 if ( ! hasBeenUpgraded ( packageName ) ) {
99- process . stdout . write ( `WARNING: ${ packageName } has not been upgraded to 0.18 yet!\n` ) ;
100- } else {
101- process . stdout . write ( 'INFO: Installing latest version of ' + packageName + '\n' ) ;
102-
103- try {
104- child_process . execFileSync ( elm , [ 'package' , 'install' , '--yes' , packageName ] ) ;
105- } catch ( e ) {
106- process . stdout . write ( `Failed to upgrade ${ packageName } ! Reverting changes..\n` ) ;
107- saveFile ( oldElmPackage ) ;
108- }
104+ displayHintForNonUpgradedPackage ( packageName ) ;
105+ return ;
106+ }
107+
108+ process . stdout . write ( 'INFO: Installing latest version of ' + packageName + '\n' ) ;
109+
110+ try {
111+ child_process . execFileSync ( elm , [ 'package' , 'install' , '--yes' , packageName ] ) ;
112+ } catch ( e ) {
113+ process . stdout . write ( `Failed to upgrade ${ packageName } ! Reverting changes..\n` ) ;
114+ saveFile ( oldElmPackage ) ;
109115 }
110116 } ) ;
111117
0 commit comments