Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

do not override existing Cargo.lock #192

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eugene-babichenko
Copy link

@eugene-babichenko eugene-babichenko commented May 6, 2021

closes #163

I could just remove that line, but I think this will break clients that rely on the existing behavior and would need a major release.

@eugene-babichenko eugene-babichenko force-pushed the dont-override-cargo-lock branch from d806ad5 to a4d1867 Compare May 7, 2021 07:24
@@ -18,7 +19,9 @@ async function getData(): Promise<interfaces.Report> {
const cargo = await Cargo.get();
await cargo.findOrInstall('cargo-audit');

await cargo.call(['generate-lockfile']);
if (!fs.existsSync('Cargo.lock')) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use the async call (stat?) for extra nicety. Not sure if this will make any difference, though.

@agrinman
Copy link

agrinman commented Sep 9, 2021

Any outstanding changes required on this PR that I can help with? Running into the same issue :)

@eugene-babichenko
Copy link
Author

Not really, this branch is usable as it is.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

generate-lockfile overwrites a checked-in Cargo.lock
3 participants