Skip to content

Commit

Permalink
fix sed command in macros
Browse files Browse the repository at this point in the history
The char "/" was included in $msg.
It will have issue

"sed: -e expression #1, char 7: unknown option to `s'"

We can substitute '/' with '#' in sed command to solve this issue

Signed-off-by: wutianwei <[email protected]>

Change-Id: I1308e9b1b2111f0033df119e4465df4dda27eac0
  • Loading branch information
wutianwei committed Feb 7, 2018
1 parent 0b4524b commit ec681c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jjb/global/releng-macros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
if [[ -s violation.log ]]; then
echo "Reporting lint result..."
msg="Found syntax error and/or coding style violation(s) in the files modified by your patchset."
sed -i -e '1s/^//$msg\n\n/' violation.log
sed -i -e "1s#^#${msg}\n\n#" violation.log
cmd="gerrit review -p $GERRIT_PROJECT -m \"$(cat violation.log)\" $GERRIT_PATCHSET_REVISION --notify NONE"
ssh -p 29418 gerrit.opnfv.org "$cmd"
Expand Down Expand Up @@ -348,7 +348,7 @@
builders:
- shell: |
#!/bin/bash
# Install python package
# Install python package
sudo pip install "flake8==2.6.2"
echo "Checking python code..."
Expand Down

0 comments on commit ec681c8

Please sign in to comment.