File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -139,10 +139,13 @@ export class Udd {
139139 return { initUrl, initVersion } ;
140140 }
141141
142- await this . progress . log ( `Attempting update: ${ url . url } -> ${ newVersion } ` ) ;
143- const failed : boolean = await this . maybeReplace ( url , newVersion , initUrl ) ;
144- const msg = failed ? "failed" : "successful" ;
145- await this . progress . log ( `Update ${ msg } : ${ url . url } -> ${ newVersion } ` ) ;
142+ let failed = false ;
143+ if ( ! this . options . dryRun ) {
144+ await this . progress . log ( `Attempting update: ${ url . url } -> ${ newVersion } ` ) ;
145+ failed = await this . maybeReplace ( url , newVersion , initUrl ) ;
146+ const msg = failed ? "failed" : "successful" ;
147+ await this . progress . log ( `Update ${ msg } : ${ url . url } -> ${ newVersion } ` ) ;
148+ }
146149 const maybeFragment = newFragmentToken === undefined
147150 ? ""
148151 : `#${ newFragmentToken } ` ;
@@ -164,7 +167,7 @@ export class Udd {
164167 await this . replace ( initUrl , newUrl ) ;
165168
166169 const failed = await this . test ( ) . then ( ( _ ) => false ) . catch ( ( _ ) => true ) ;
167- if ( failed || this . options . dryRun ) {
170+ if ( failed ) {
168171 await this . replace ( newUrl , initUrl ) ;
169172 }
170173 return failed ;
You can’t perform that action at this time.
0 commit comments