Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nuke_if_too_big documentation (Cherry-pick of #17429) #17430

Merged
merged 1 commit into from Nov 2, 2022

Conversation

benjyw
Copy link
Sponsor Contributor

@benjyw benjyw commented Nov 2, 2022

  • As of pants 2.13 the .pants/setup directory is approximately 300mb big, resulting in the example always clearing the directory.
  • Updated the script to pass shellcheck.

Previous implementation failed with:

Line 4:
    size_mb=$(du -m -d0 ${path} | cut -f 1)
                        ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

  Did you mean: (apply this, apply all SC2086)
    size_mb=$(du -m -d0 "${path}" | cut -f 1)

  Line 5:
    if (( ${size_mb} > ${limit_mb} )); then
          ^-- SC2004 (style): $/${} is unnecessary on arithmetic variables.
                       ^-- SC2004 (style): $/${} is unnecessary on arithmetic variables.

  Line 7:
      rm -rf ${path}
             ^-- SC2086 (info): Double quote to prevent globbing and word splitting.

  Did you mean: (apply this, apply all SC2086)
      rm -rf "${path}"

* Increased size of `.cache/pants/setup` path

This path is now typically larger than 256mb.

* Fixed nuke_if_too_big shellcheck
@benjyw benjyw merged commit b7dab8d into pantsbuild:2.14.x Nov 2, 2022
@benjyw benjyw deleted the cherry-pick-17429-to-2.14.x branch November 2, 2022 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants