Skip to content

Commit

Permalink
remove file check
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Sep 11, 2024
1 parent 34a822a commit 136f373
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/tasks/src/stop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ const localnetStop = async (args: any) => {
try {
process.kill(Number(pid));
console.log(ansis.green(`Successfully stopped localnet (PID: ${pid})`));

// Unlink PID file only if it exists
if (fs.existsSync(LOCALNET_PID_FILE)) {
fs.unlinkSync(LOCALNET_PID_FILE);
console.log(ansis.green(`PID file ${LOCALNET_PID_FILE} removed.`));
}
fs.unlinkSync(LOCALNET_PID_FILE);
console.log(ansis.green(`PID file ${LOCALNET_PID_FILE} removed.`));
} catch (err) {
console.error(ansis.red(`Failed to stop localnet: ${err}`));
}
Expand Down

0 comments on commit 136f373

Please sign in to comment.