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

Fix bug in shebang handling #71487

Merged
merged 1 commit into from
May 26, 2020
Merged

Fix bug in shebang handling #71487

merged 1 commit into from
May 26, 2020

Commits on May 25, 2020

  1. Fix bug in shebang handling

    Shebang handling was too agressive in stripping out the first line in cases where it is actually _not_ a shebang, but instead, valid rust (rust-lang#70528). This is a second attempt at resolving this issue (the first attempt was flawed, for, among other reasons, causing an ICE in certain cases (rust-lang#71372, rust-lang#71471).
    
    The behavior is now codified by a number of UI tests, but simply:
    For the first line to be a shebang, the following must all be true:
    1. The line must start with `#!`
    2. The line must contain a non whitespace character after `#!`
    3. The next character in the file, ignoring comments & whitespace must not be `[`
    
    I believe this is a strict superset of what we used to allow, so perhaps a crater run is unnecessary, but probably not a terrible idea.
    rcoh committed May 25, 2020
    Configuration menu
    Copy the full SHA
    a93d316 View commit details
    Browse the repository at this point in the history