@@ -18,7 +18,7 @@ import { getRepoStarStatus, isRepoStarredInSession, starAllRepositories, starRep
1818import { createKeyInternal } from './key'
1919import { doLoginExists , loginInternal } from './login'
2020import { showReplicationProgress } from './replicationProgress'
21- import { createSupabaseClient , findBuildCommandForProjectType , findMainFile , findMainFileForProjectType , findProjectType , findRoot , findSavedKey , formatError , getAllPackagesDependencies , getAppId , getBundleVersion , getConfig , getInstalledVersion , getLocalConfig , getOrganization , getPackageScripts , getPMAndCommand , PACKNAME , projectIsMonorepo , updateConfigbyKey , updateConfigUpdater , validateIosUpdaterSync , verifyUser } from './utils'
21+ import { createSupabaseClient , findBuildCommandForProjectType , findMainFile , findMainFileForProjectType , findProjectType , findRoot , findSavedKey , formatError , getAllPackagesDependencies , getAppId , getBundleVersion , getConfig , getInstalledVersion , getLocalConfig , getNativeProjectResetAdvice , getOrganization , getPackageScripts , getPMAndCommand , PACKNAME , projectIsMonorepo , updateConfigbyKey , updateConfigUpdater , validateIosUpdaterSync , verifyUser } from './utils'
2222
2323interface SuperOptions extends Options {
2424 local : boolean
@@ -188,13 +188,14 @@ async function saveAppIdToCapacitorConfig(appId: string) {
188188}
189189
190190function stopForBrokenIosSync ( platformRunner : string , details : string [ ] ) : never {
191+ const resetAdvice = getNativeProjectResetAdvice ( platformRunner , 'ios' )
191192 pLog . error ( 'Capgo iOS dependency sync verification failed.' )
192193 for ( const detail of details ) {
193194 pLog . error ( detail )
194195 }
195196 pLog . error ( 'Stop here to avoid testing on a broken native iOS project.' )
196- pLog . warn ( 'Best fix: run this in your terminal to reset iOS and sync again.' )
197- pLog . info ( ` ${ platformRunner } cap rm ios && ${ platformRunner } cap add ios && ${ platformRunner } cap sync ios` )
197+ pLog . warn ( resetAdvice . summary )
198+ pLog . info ( resetAdvice . command )
198199 pOutro ( 'After reset, run the same `capgo init ...` command to resume onboarding from where you left off (no need to redo previous steps).' )
199200 exit ( 1 )
200201}
0 commit comments