{"action":"closed","issue":{"url":"https://api.github.com/repos/buildkite-plugins/docker-buildkite-plugin/issues/74","repository_url":"https://api.github.com/repos/buildkite-plugins/docker-buildkite-plugin","labels_url":"https://api.github.com/repos/buildkite-plugins/docker-buildkite-plugin/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/buildkite-plugins/docker-buildkite-plugin/issues/74/comments","events_url":"https://api.github.com/repos/buildkite-plugins/docker-buildkite-plugin/issues/74/events","html_url":"https://github.com/buildkite-plugins/docker-buildkite-plugin/issues/74","id":370398253,"node_id":"MDU6SXNzdWUzNzAzOTgyNTM=","number":74,"title":"shellcheck example in README fails with `Invalid number: -c`","user":{"login":"huonw","id":1203825,"node_id":"MDQ6VXNlcjEyMDM4MjU=","avatar_url":"https://avatars1.githubusercontent.com/u/1203825?v=4","gravatar_id":"","url":"https://api.github.com/users/huonw","html_url":"https://github.com/huonw","followers_url":"https://api.github.com/users/huonw/followers","following_url":"https://api.github.com/users/huonw/following{/other_user}","gists_url":"https://api.github.com/users/huonw/gists{/gist_id}","starred_url":"https://api.github.com/users/huonw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huonw/subscriptions","organizations_url":"https://api.github.com/users/huonw/orgs","repos_url":"https://api.github.com/users/huonw/repos","events_url":"https://api.github.com/users/huonw/events{/privacy}","received_events_url":"https://api.github.com/users/huonw/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-16T00:58:59Z","updated_at":"2018-10-22T23:05:58Z","closed_at":"2018-10-22T23:05:58Z","author_association":"NONE","body":"I created a pipeline that was (almost exactly) copied from this plugin's README: \r\n\r\n```\r\nsteps:\r\n  - plugins:\r\n      docker#v1.4.0:\r\n        image: \"koalaman/shellcheck\"\r\n        command: [\"./scripts/env.sh\"]\r\n```\r\n\r\nThis failed with:\r\n\r\n```\r\n--- :docker: Running  in koalaman/shellcheck\r\nUnable to find image 'koalaman/shellcheck:latest' locally\r\nlatest: Pulling from koalaman/shellcheck\r\n4ce50f5e1cc9: Pull complete \r\n72c15ff5b56b: Pull complete \r\nDigest: sha256:efc19e81d1a17fad9cbf4b6630d6bdd50839e6573402063f454459764c3538b0\r\nStatus: Downloaded newer image for koalaman/shellcheck:latest\r\nInvalid number: -c\r\n🚨 Error: The command exited with status 3\r\n```\r\n\r\nI get the same error message when I run `docker run -it koalaman/shellcheck /bin/sh -e -c` locally, suggesting that `command` isn't defaulting the `shell` option to `false` as documented.\r\n\r\n<details><summary>More of the log</summary>\r\n\r\n```\r\n# Plugin \"github.com/buildkite-plugins/docker-buildkite-plugin\" will be checked out to \"/var/lib/buildkite-agent/plugins/github-com-buildkite-plugins-docker-buildkite-plugin-v1-4-0\"\r\n$ cd /var/lib/buildkite-agent/plugins/github-com-buildkite-plugins-docker-buildkite-plugin-v1-4-0\r\n# Switching to the plugin directory\r\n$ git clone -v -- https://github.com/buildkite-plugins/docker-buildkite-plugin .\r\nCloning into '.'...\r\nPOST git-upload-pack (765 bytes)\r\nremote: Enumerating objects: 77, done.\r\nremote: Counting objects: 100% (77/77), done.\r\nremote: Compressing objects: 100% (28/28), done.\r\nremote: Total 579 (delta 38), reused 66 (delta 33), pack-reused 502\r\nReceiving objects: 100% (579/579), 151.18 KiB | 726.00 KiB/s, done.\r\nResolving deltas: 100% (255/255), done.\r\n# Checking out `v1.4.0`\r\n$ git checkout -f v1.4.0\r\nNote: checking out 'v1.4.0'.\r\n\r\nYou are in 'detached HEAD' state. You can look around, make experimental\r\nchanges and commit them, and you can discard any commits you make in this\r\nstate without impacting any branches by performing another checkout.\r\n\r\nIf you want to create a new branch to retain commits you create, you may\r\ndo so (now or later) by using -b with the checkout command again. Example:\r\n\r\n  git checkout -b <new-branch-name>\r\n\r\nHEAD is now at e6a11d4... Merge pull request #55 from buildkite-plugins/make-sure-to-error-on-multiple-command-failure\r\n$ cd /\r\n... snip ...\r\n~~~ Running global pre-command hook\r\n$ /etc/buildkite-agent/hooks/pre-command\r\n~~~ Authenticating with AWS ECR\r\nWARNING! Using --password via the CLI is insecure. Use --password-stdin.\r\nLogin Succeeded\r\n~~~ :docker: Logging into docker registry hub.docker.com\r\nWARNING! Using --password via the CLI is insecure. Use --password-stdin.\r\nLogin Succeeded\r\n# BUILDKITE_PLUGIN_ECR_LOGIN changed\r\n# BUILDKITE_PLUGIN_DOCKER_LOGIN_USERNAME changed\r\n# BUILDKITE_PLUGIN_DOCKER_LOGIN_PASSWORD changed\r\n~~~ Running plugin github.com/buildkite-plugins/docker-buildkite-plugin#v1.4.0 command hook\r\n$ /var/lib/buildkite-agent/plugins/github-com-buildkite-plugins-docker-buildkite-plugin-v1-4-0/hooks/command\r\n--- :docker: Running  in koalaman/shellcheck\r\nUnable to find image 'koalaman/shellcheck:latest' locally\r\nlatest: Pulling from koalaman/shellcheck\r\n4ce50f5e1cc9: Pull complete \r\n72c15ff5b56b: Pull complete \r\nDigest: sha256:efc19e81d1a17fad9cbf4b6630d6bdd50839e6573402063f454459764c3538b0\r\nStatus: Downloaded newer image for koalaman/shellcheck:latest\r\nInvalid number: -c\r\n🚨 Error: The command exited with status 3\r\n^^^ +++\r\n^^^ +++\r\n~~~ Running global pre-exit hook\r\n$ /etc/buildkite-agent/hooks/pre-exit\r\n~~~ Stopping ssh-agent 4792\r\nunset SSH_AUTH_SOCK;\r\nunset SSH_AGENT_PID;\r\necho Agent pid 4792 killed;\r\n\r\n```\r\n\r\n</details>"}}
{"actor":{"display_login":"lox"}}