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

/home/r/script.sh: line 10: syntax error near unexpected token `;' #1610

Open
maxonfjvipon opened this issue Feb 18, 2023 · 2 comments
Open

Comments

@maxonfjvipon
Copy link

maxonfjvipon commented Feb 18, 2023

My .rultor.yml

architect:
  - maxonfjvipon
docker:
  as_root: true
assets:
  auth.json: maxonfjvipon/bpe-selector-secrets#auth.json
merge:
  commanders:
    - maxonfjvipon
    - bace1982
    - Parfnic
  script: |-
    add-apt-repository ppa:ondrej/php -y
    
    sudo apt-get update
    
    apt install php8.1 -y
    
    apt-get install php8.1-{xml,mbstring,xdebug} -y
    
    sudo update-alternatives --set php /usr/bin/php8.1
    
    echo 'xdebug.mode=coverage' >> /etc/php/8.1/cli/php.ini
    
    php -r "file_exists('.env') || copy('.env.example', '.env');"
    
    composer validate --strict
      
    cp ../auth.json auth.json
    
    composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
    
    php artisan key:generate
    
    chmod -R 777 storage bootstrap/cache
    
    ./pre-push.sh

When I do @rultor merge I get this log:

+ docker ps --filter=status=exited
+ grep --quiet '\sbpe-selector-org_bpe-selector-app_117\s*$'
+ ls -al .
total 48
drwx------  3 rultor rultor 4096 Feb 19 00:08 .
drwxrwxrwt 14 root   root   4096 Feb 19 00:08 ..
-rw-rw-r--  1 rultor rultor  183 Feb 19 00:08 auth.json
-rwxrwxr-x  1 rultor rultor  556 Feb 19 00:08 end.sh
-rwxrwxr-x  1 rultor rultor  162 Feb 19 00:08 entry.sh
-rw-rw-r--  1 rultor rultor    8 Feb 19 00:08 pid
drwxrwxr-x 15 rultor rultor 4096 Feb 19 00:08 repo
-rwxrwxr-x  1 rultor rultor 7092 Feb 19 00:08 run.sh
-rw-rw-r--  1 rultor rultor 1010 Feb 19 00:08 script.sh
-rw-rw-r--  1 rultor rultor 7130 Feb 19 00:08 stdout
++ pwd
++ pwd
+ docker run -t --rm -v /tmp/rultor-L36y:/main [email protected]:bpe-selector-org/bpe-selector-app.git --env=pull_id=117 [email protected]:bpe-selector-org/bpe-selector-app.git --env=fork_branch=rultor --env=head_branch=master '--env=pull_title=test change' --env=author=maxonfjvipon '--env=scripts=( '\''export '\''\'\'''\''[email protected]:bpe-selector-org/bpe-selector-app.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_id=117'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''[email protected]:bpe-selector-org/bpe-selector-app.git'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''fork_branch=rultor'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''head_branch=master'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''pull_title=test change'\''\'\'''\'''\'' '\'';'\'' '\''export '\''\'\'''\''author=maxonfjvipon'\''\'\'''\'''\'' '\'';'\'' '\''add-apt-repository ppa:ondrej/php -y'\'' '\'';'\'' '\''sudo apt-get update'\'' '\'';'\'' '\''apt install php8.1 -y'\'' '\'';'\'' '\''apt-get install php8.1-{xml,mbstring,xdebug} -y'\'' '\'';'\'' '\''sudo update-alternatives --set php /usr/bin/php8.1'\'' '\'';'\'' '\''echo '\''\'\'''\''xdebug.mode=coverage'\''\'\'''\'' >> /etc/php/8.1/cli/php.ini'\'' '\'';'\'' '\''php -r "file_exists('\''\'\'''\''.env'\''\'\'''\'') || copy('\''\'\'''\''.env.example'\''\'\'''\'', '\''\'\'''\''.env'\''\'\'''\'');"'\'' '\'';'\'' '\''composer validate --strict'\'' '\'';'\'' '\'''\'' '\'';'\'' '\''cp ../auth.json auth.json'\'' '\'';'\'' '\''composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist'\'' '\'';'\'' '\''php artisan key:generate'\'' '\'';'\'' '\''chmod -R 777 storage bootstrap/cache'\'' '\'';'\'' '\''./pre-push.sh'\'' '\'';'\'' )' --hostname=docker --privileged --memory=8g --memory-swap=16g --oom-kill-disable --cidfile=/tmp/rultor-L36y/cid -w=/main -v /var/run/docker.sock:/var/run/docker.sock --name=bpe-selector-org_bpe-selector-app_117 yegor256/rultor-image /main/entry.sh
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
Using /usr/local/rvm/gems/ruby-3.0.1
Using /usr/local/rvm/gems/ruby-3.0.1
+ set -e
+ set -o pipefail
+ mkdir /home/r
+ cp -R ./auth.json ./cid ./end.sh ./entry.sh ./pid ./repo ./run.sh ./script.sh ./stdout /home/r
+ rm -rf repo
+ chmod a+x /home/r/script.sh
+ /home/r/script.sh
+ set -e
+ set -o pipefail
+ '[' -e /home/r/.profile ']'
+ shopt -s expand_aliases
+ alias 'sudo=sudo -i'
+ export HOME=/home/r
+ HOME=/home/r
+ cd /home/r/repo
/home/r/script.sh: line 10: syntax error near unexpected token `;'
container e77f35edb2af9dee339064fbdc79672d613c2d7b92b3767dcbc53236f44a1081 is dead
Sun 19 Feb 2023 12:09:42 AM CET

What can be reason of such behavior?

pnatashap added a commit to pnatashap/rultor that referenced this issue Feb 16, 2024
@pnatashap
Copy link
Contributor

pnatashap commented Feb 21, 2024

Can be another variant of #1326 and #1253

@pnatashap
Copy link
Contributor

one more problem with ` in command #1312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants