Skip to content

Commit

Permalink
Update main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
michalziolkowski committed Mar 26, 2024
1 parent 20bdee1 commit 3c69b39
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/cli/src/commands/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,16 @@ async function main(ghActionArgs?: GHActionArgs): Promise<MainOutput> {
const output = createOutput({ buildIndex: build.index, projectIndex, teamId });

const expoDir = path.join(args.projectRoot, '.expo');
if (fs.existsSync(expoDir)) {
fs.writeFileSync(path.join(expoDir, 'sherlo.json'), JSON.stringify(output));

// Check if the directory exists
if (!fs.existsSync(expoDir)) {
// If the directory does not exist, create it
fs.mkdirSync(expoDir, { recursive: true });
}

// Now that we've ensured the directory exists, write the file
fs.writeFileSync(path.join(expoDir, 'sherlo.json'), JSON.stringify(output));

console.log(
`Sherlo is awaiting your builds to be uploaded asynchronously.\nView your test results at: ${output.url}\n`
);
Expand Down

0 comments on commit 3c69b39

Please sign in to comment.