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

Mina doesn't enclose commands in parenthesis. #417

Closed
x-yuri opened this issue Aug 15, 2016 · 3 comments
Closed

Mina doesn't enclose commands in parenthesis. #417

x-yuri opened this issue Aug 15, 2016 · 3 comments

Comments

@x-yuri
Copy link

x-yuri commented Aug 15, 2016

config/deploy.rb:

...
  deploy do
    ...
    invoke :'npm:install'
    command 'npm run build:prod'
  end
...
$ bundle exec mina deploy
...
    rm -rf .git &&

          echo "-----> Installing node modules using Npm"
          sub_directory=$(pwd | sed -r "s/.*?$(basename $build_path)//g")
          mkdir -p "/home/u1/app//home/u1/app/shared/$sub_directory/node_modules"
          ln -s "/home/u1/app//home/u1/app/shared/$sub_directory/node_modules" "node_modules"
          npm install --production
         &&   # <--- syntax error here!!!
    npm run build:prod
...

Most likely, mina should enclose each command in parenthesis, probably here.

@d4be4st
Copy link
Member

d4be4st commented Aug 27, 2016

This is a bug in mina-npm plugin.

It has a bad taks configuration: https://github.com/mina-deploy/mina-npm/blob/master/lib/mina/npm/tasks.rb#L13

it writes everyting in one string without && or parenthesis.

@d4be4st d4be4st closed this as completed Aug 27, 2016
@x-yuri
Copy link
Author

x-yuri commented Aug 29, 2016

When I do this:

command '
  (
    echo 1
    echo 2
  )
'
command 'exit 1'

I get:

          (
            echo 1
            echo 2
          )
         &&
    exit 1 &&

Which has wrong syntax.

Also, why not automatically add parenthesis?

@d4be4st
Copy link
Member

d4be4st commented Sep 17, 2016

fixed with #427

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