File tree 1 file changed +13
-11
lines changed 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -163,18 +163,20 @@ function removeFolder( relativePath ) {
163
163
}
164
164
165
165
async function updateCodexRepoBranchIfNecessary ( opts , mwBranch ) {
166
- // If the user hasn't specified a '--repo-branch' for codex
167
- // determine which version the MW branch wants and use it
168
- if ( ! opts . repoBranch ?. some ( ( branch ) => branch . startsWith ( 'design/codex:' ) ) ) {
169
- let codexVersion ;
170
- try {
171
- codexVersion = await getCodexVersionForMWBranch ( mwBranch ) ;
172
- } catch ( error ) {
173
- codexVersion = await getLatestCodexVersion ( ) ;
174
- console . log ( `\x1b[33m${ error . message } Falling back to latest Codex version ${ codexVersion } \x1b[0m` ) ;
175
- }
176
- opts . repoBranch = [ ...( opts . repoBranch ?? [ ] ) , `design/codex:${ codexVersion } ` ] ;
166
+ // Return if the user has already specified a '--repo-branch' for Codex
167
+ if ( opts . repoBranch ?. some ( ( branch ) => branch . startsWith ( 'design/codex:' ) ) ) {
168
+ return ;
169
+ }
170
+ // Determine which Codex version the MW branch wants and use it,
171
+ // fallback on latest version
172
+ let codexVersion ;
173
+ try {
174
+ codexVersion = await getCodexVersionForMWBranch ( mwBranch ) ;
175
+ } catch ( error ) {
176
+ codexVersion = await getLatestCodexVersion ( ) ;
177
+ console . log ( `\x1b[33m${ error . message } Falling back to latest Codex version ${ codexVersion } \x1b[0m` ) ;
177
178
}
179
+ opts . repoBranch = [ ...( opts . repoBranch ?? [ ] ) , `design/codex:${ codexVersion } ` ] ;
178
180
}
179
181
180
182
/**
You can’t perform that action at this time.
0 commit comments