Skip to content

Unhandled Promise in update.js — missing await on writeUpdate #554

@MadhuNimmo

Description

@MadhuNimmo

While analyzing the code using a static analysis tool, we noticed that the call to writeUpdate(latestVersion, shouldCommit) in update.js is not awaited.

Since writeUpdate is an async function, calling it without await (or .then()) creates a floating promise, which can result in unhandled rejections or silent failures if an error is thrown inside the function.

This issue is also flagged by @typescript-eslint/no-floating-promises.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions