{"action":"created","issue":{"url":"https://api.github.com/repos/Scalingo/cli/issues/97","labels_url":"https://api.github.com/repos/Scalingo/cli/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/Scalingo/cli/issues/97/comments","events_url":"https://api.github.com/repos/Scalingo/cli/issues/97/events","html_url":"https://github.com/Scalingo/cli/issues/97","id":63247316,"number":97,"title":"Running a command between quotes does not work","user":{"login":"yannski","id":11287,"avatar_url":"https://avatars.githubusercontent.com/u/11287?v=3","gravatar_id":"","url":"https://api.github.com/users/yannski","html_url":"https://github.com/yannski","followers_url":"https://api.github.com/users/yannski/followers","following_url":"https://api.github.com/users/yannski/following{/other_user}","gists_url":"https://api.github.com/users/yannski/gists{/gist_id}","starred_url":"https://api.github.com/users/yannski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yannski/subscriptions","organizations_url":"https://api.github.com/users/yannski/orgs","repos_url":"https://api.github.com/users/yannski/repos","events_url":"https://api.github.com/users/yannski/events{/privacy}","received_events_url":"https://api.github.com/users/yannski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-20T15:18:33Z","updated_at":"2015-03-20T15:23:40Z","closed_at":null,"body":"```\r\nscalingo -a jenvoiedulourd-production run rails runner \"Product.all.map(&:save)\"\r\n```\r\ndoes not work as expected. Output is:\r\n```\r\n/tmp/script-1426864596: line 2: syntax error near unexpected token `('\r\n/tmp/script-1426864596: line 2: `rails runner Product.all.map(&:save);ProductCategory.all.map(&:save)'\r\nWARN: Error when updating terminal size: Invalid error code from run server: 500 Internal Server Error\r\n```\r\n\r\nWhat's the correct syntax? Maybe write it down in the doc :)"},"comment":{"url":"https://api.github.com/repos/Scalingo/cli/issues/comments/84048406","html_url":"https://github.com/Scalingo/cli/issues/97#issuecomment-84048406","issue_url":"https://api.github.com/repos/Scalingo/cli/issues/97","id":84048406,"user":{"login":"Soulou","id":329969,"avatar_url":"https://avatars.githubusercontent.com/u/329969?v=3","gravatar_id":"","url":"https://api.github.com/users/Soulou","html_url":"https://github.com/Soulou","followers_url":"https://api.github.com/users/Soulou/followers","following_url":"https://api.github.com/users/Soulou/following{/other_user}","gists_url":"https://api.github.com/users/Soulou/gists{/gist_id}","starred_url":"https://api.github.com/users/Soulou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Soulou/subscriptions","organizations_url":"https://api.github.com/users/Soulou/orgs","repos_url":"https://api.github.com/users/Soulou/repos","events_url":"https://api.github.com/users/Soulou/events{/privacy}","received_events_url":"https://api.github.com/users/Soulou/received_events","type":"User","site_admin":false},"created_at":"2015-03-20T15:23:40Z","updated_at":"2015-03-20T15:23:40Z","body":"The command you're sending should be a shell command, I explain myself, currently, you can run\r\n\r\n```\r\nscalingo run -f dump.sql \"rails dbconsole < /tmp/uploads/dump.sql\"\r\n```\r\n\r\nThe solution for your use case is to use single quotes.\r\n\r\n```\r\nscalingo -a jenvoiedulourd-production run rails runner 'Product.all.map(&:save)'\r\n```\r\n\r\nIn this case, nothing will be interpretated and the rails runner will be able to use the string."}}