mirror of
https://github.com/tiktok/sparo.git
synced 2024-11-27 01:26:07 -05:00
fix: ci test
This commit is contained in:
parent
e379119283
commit
97adbfc17b
1 changed files with 3 additions and 2 deletions
|
@ -109,11 +109,12 @@ export class ListProfilesCommand implements ICommand<IListProfilesCommandOptions
|
|||
.join(' ')} `;
|
||||
let res: { projects: IProject[] } | undefined;
|
||||
const resultString: string = childProcess.execSync(rushListCmd).toString();
|
||||
const firstOpenBraceIndex: number = resultString.indexOf('{');
|
||||
try {
|
||||
res = JSON.parse(resultString);
|
||||
res = JSON.parse(resultString.slice(firstOpenBraceIndex));
|
||||
} catch (e) {
|
||||
throw new Error(
|
||||
`Parse json result from ${rushListCmd} failed.\nError: ${e.message}\nrush returns:\n${resultString}\n`
|
||||
`Parse json result from "${rushListCmd}" failed.\nError: ${e.message}\nrush returns:\n${resultString}\n`
|
||||
);
|
||||
}
|
||||
if (res) {
|
||||
|
|
Loading…
Reference in a new issue