Skip to content

Conversation

@webern
Copy link
Contributor

@webern webern commented Jan 9, 2024

Issue number:

N/A

Description of changes:

twoliter build variant produces an error if the tools directory does not exist. This fixes the bug and also uses crate::common::fs for better error messages.

Testing done:

  • built bottlerocket
  • build test project1 with alpha sdk

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

@webern webern requested review from bcressey and ecpullen January 9, 2024 22:17
let toolsdir = project.project_dir().join("build/tools");
tokio::fs::remove_dir_all(&toolsdir).await?;
tokio::fs::create_dir_all(&toolsdir).await?;
let _ = fs::remove_dir_all(&toolsdir).await;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a comment stating why we are suppressing the remove_dir_all error?

@webern
Copy link
Contributor Author

webern commented Jan 9, 2024

twoliter build variant produces an error if the tools directory does not
exist. This fixes the bug and also uses crate::common::fs for better
error messages.
@webern
Copy link
Contributor Author

webern commented Jan 9, 2024

@webern webern merged commit 4479202 into bottlerocket-os:develop Jan 10, 2024
@webern webern deleted the common-fs branch January 10, 2024 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants