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

Properly escape \ in the regex for removing sct_env from old RC files #3872

Merged
merged 1 commit into from Sep 2, 2022

Conversation

joshuacwnewton
Copy link
Member

@joshuacwnewton joshuacwnewton commented Sep 2, 2022

Description

install_sct uses a regex-based perl -pi -e find and replace command to comment out any instances of the sct_env environment variable being set (which is no longer used).

This PR amends the perl -pi -e statement so that it uses the pattern that was tested by @kousu in #3805 (comment).

(The reason for this bug is because, in #3805 (comment), the PR "suggestion" was subtly different than what was actually tested.)

Linked issues

Fixes #3871.

Copy link
Member

@mguaypaq mguaypaq left a comment

Choose a reason for hiding this comment

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

I don't think this warrants an automated test, but just to confirm, I did copy-paste the command in a terminal and checked that it correctly comments out any line containing bin/sct_env.

@mguaypaq mguaypaq merged commit c26086e into master Sep 2, 2022
@mguaypaq mguaypaq deleted the jn/3871-escape-slash-in-regex branch September 2, 2022 15:56
@joshuacwnewton joshuacwnewton added this to the 5.8 milestone Nov 29, 2022
@joshuacwnewton joshuacwnewton added the bug category: fixes an error in the code label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug category: fixes an error in the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sct_env-removing regex pattern is malformed, and causes an error when invoked
2 participants