[Fix] Executing install.sh failed when ${password} and others contain @ - #6733
[Fix] Executing install.sh failed when ${password} and others contain @#6733tracehh wants to merge 0 commit into
Conversation
while sed -i ${txt} "s/^spring.datasource.password=.*/spring.datasource.password=${password}/g" and ${password} is qwer/1234, the same error May have a better way |
Codecov Report
@@ Coverage Diff @@
## dev #6733 +/- ##
============================================
- Coverage 37.99% 37.93% -0.06%
+ Complexity 3243 3235 -8
============================================
Files 643 643
Lines 26409 26409
Branches 2861 2861
============================================
- Hits 10034 10019 -15
- Misses 15453 15469 +16
+ Partials 922 921 -1
Continue to review full report at Codecov.
|
| sed -i ${txt} "s@^spring.datasource.username=.*@spring.datasource.username=${username}@g" conf/datasource.properties | ||
| sed -i ${txt} "s@^spring.datasource.password=.*@spring.datasource.password=${password}@g" conf/datasource.properties | ||
| sed -i ${txt} "s/^spring.datasource.username=.*/spring.datasource.username=${username}/g" conf/datasource.properties | ||
| sed -i ${txt} "s/^spring.datasource.password=.*/spring.datasource.password=${password}/g" conf/datasource.properties |
There was a problem hiding this comment.
Good catch! But when we password contains /, does this command work?
There was a problem hiding this comment.
I think maybe we should find more general way to escape specific characters
There was a problem hiding this comment.
Yeah,need to consider both of 's','g','@'
There was a problem hiding this comment.
Yes, we have to consider other character that must be escaped. maybe we should add a escape function to do that, WDYT? @tracehh
There was a problem hiding this comment.
Yes,I am working on this
|
@tracehh Is there an issue associated with this PR |
|
Kudos, SonarCloud Quality Gate passed! |
|
ok, I create an issue : #6781 I open another pr for this issue. @zhongjiajie |
@tracehh Hi, you could just edit PR describe instead of open another PR, cause another PR would lost context about preview review. |









Purpose of the pull request
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows: