File tree Expand file tree Collapse file tree
packages/cli/src/cli/cmd/ci/flows Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " lingo.dev " : patch
3+ ---
4+
5+ reuse i18n inside ci cmd
Original file line number Diff line number Diff line change 11import { execSync } from "child_process" ;
22import path from "path" ;
33import { gitConfig , IntegrationFlow } from "./_base" ;
4+ import i18nCmd from "../../i18n" ;
45
56export class InBranchFlow extends IntegrationFlow {
67 async preRun ( ) {
@@ -55,10 +56,16 @@ export class InBranchFlow extends IntegrationFlow {
5556 }
5657
5758 private async runLingoDotDev ( ) {
58- execSync (
59- `npx lingo.dev@latest i18n --api-key ${ this . platformKit . config . replexicaApiKey } ` ,
60- { stdio : "inherit" } ,
61- ) ;
59+ try {
60+ await i18nCmd
61+ . exitOverride ( )
62+ . parseAsync ( [ "--api-key" , this . platformKit . config . replexicaApiKey ] , {
63+ from : "user" ,
64+ } ) ;
65+ } catch ( err : any ) {
66+ if ( err . code === "commander.helpDisplayed" ) return ;
67+ throw err ;
68+ }
6269 }
6370
6471 private configureGit ( ) {
You can’t perform that action at this time.
0 commit comments