Skip to content

Commit

Permalink
Added error handling
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
adithyanotfound and coderabbitai[bot] authored Oct 21, 2024
1 parent c978e6f commit bd47fb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ export async function main(): Promise<void> {
fs.readFileSync('.env'),
).REACT_APP_BACKEND_WEBSOCKET_URL;
fs.readFile('.env', 'utf8', (err, data) => {
if (err) {
console.error('Error reading .env file:', err);
process.exit(1);
}
const result = data.replace(
`REACT_APP_BACKEND_WEBSOCKET_URL=${websocketUrl}`,
`REACT_APP_BACKEND_WEBSOCKET_URL=${endpoint}`,
Expand Down

0 comments on commit bd47fb6

Please sign in to comment.