Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If a shebang already exists when adding a preamble, preserve it. (Che…
…rry-pick of #19133) (#19137) Currently if a file contains a shebang but no preamble, the premable linter will break the shebang by prepending the preamble. This change adjusts the regex match to preserve the existing shebang. Co-authored-by: Stu Hood <stuhood@gmail.com>
- Loading branch information
1 parent
5eda12f
commit e0e7eab
Showing
2 changed files
with
41 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters