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

Escape tilde more gracefully #16583

Merged
merged 2 commits into from
Oct 27, 2022

Commits on Oct 27, 2022

  1. Escape tilde more gracefully

    Tilde needs to be escaped only when it's the first character after the white space. Otherwise, we can keep the string unescaped.
    
    This supports bzlmod better, because tilde is used in the directory names.
    
    Users often already escape location function, for example `SJ="$(location @bazel_tools//tools/jdk:singlejar)"; $SJ`. Without the change this becomes `'external/repo~name/singlejar'` and the script fails (no file found).
    
    Location function shouldn't be escaped. But without this change we risk a lot of users will need to fix their scripts.
    
    Closes bazelbuild#16560.
    
    PiperOrigin-RevId: 484226256
    Change-Id: I6b71f89a649f8494b76a4446b8f6384421eb89d1
    comius authored and fmeum committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    763aa8e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7872c63 View commit details
    Browse the repository at this point in the history