{"action":"created","issue":{"url":"https://api.github.com/repos/pre-commit/pre-commit/issues/314","labels_url":"https://api.github.com/repos/pre-commit/pre-commit/issues/314/labels{/name}","comments_url":"https://api.github.com/repos/pre-commit/pre-commit/issues/314/comments","events_url":"https://api.github.com/repos/pre-commit/pre-commit/issues/314/events","html_url":"https://github.com/pre-commit/pre-commit/issues/314","id":120677721,"number":314,"title":":args seems to break with {} in list.","user":{"login":"marick","id":71909,"avatar_url":"https://avatars.githubusercontent.com/u/71909?v=3","gravatar_id":"","url":"https://api.github.com/users/marick","html_url":"https://github.com/marick","followers_url":"https://api.github.com/users/marick/followers","following_url":"https://api.github.com/users/marick/following{/other_user}","gists_url":"https://api.github.com/users/marick/gists{/gist_id}","starred_url":"https://api.github.com/users/marick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marick/subscriptions","organizations_url":"https://api.github.com/users/marick/orgs","repos_url":"https://api.github.com/users/marick/repos","events_url":"https://api.github.com/users/marick/events{/privacy}","received_events_url":"https://api.github.com/users/marick/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pre-commit/pre-commit/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-07T00:39:20Z","updated_at":"2015-12-07T01:54:59Z","closed_at":null,"body":"I am working on a repo with some hooks for my company: https://github.com/marick/pre-commit-hooks\r\n\r\nThere is a hook that works fine with this `.pre-commit-config.yaml`:\r\n\r\n```yaml\r\n-   repo: /Users/marick/src/pre-commit-hooks\r\n    sha: d6dee96f56bf9290f7ebb852c4252c50b8f6215d\r\n    stages: [commit, push]\r\n    hooks:\r\n    -   id: prohibit-suspicious-patterns\r\n        args: [\"AKIA[[:alnum]]\", --]\r\n```\r\n\r\nHowever, it I change the first arg by adding `{1}`:\r\n\r\n```yaml\r\n        args: [\"AKIA[[:alnum]]{1}\", --]\r\n```\r\n\r\n... I get this:\r\n\r\n```\r\nprohibit suspicious patterns..................................................................\r\nAn unexpected error has occurred: IndexError: tuple index out of range\r\nCheck the log at ~/.pre-commit/pre-commit.log\r\n```\r\n\r\nThe contents of `pre-commit.log`:\r\n\r\n```\r\nAn unexpected error has occurred: IndexError: tuple index out of range\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/site-packages/pre_commit/error_handler.py\", line 36, in error_handler\r\n    yield\r\n  File \"/usr/local/lib/python2.7/site-packages/pre_commit/main.py\", line 150, in main\r\n    return run(runner, args)\r\n  File \"/usr/local/lib/python2.7/site-packages/pre_commit/commands/run.py\", line 212, in run\r\n    return _run_hooks(repo_hooks, args, write, environ)\r\n  File \"/usr/local/lib/python2.7/site-packages/pre_commit/commands/run.py\", line 136, in _run_hooks\r\n    retval |= _run_single_hook(hook, repo, args, write, skips)\r\n  File \"/usr/local/lib/python2.7/site-packages/pre_commit/commands/run.py\", line 89, in _run_single_hook\r\n    retcode, stdout, stderr = repo.run_hook(hook, filenames)\r\n  File \"/usr/local/lib/python2.7/site-packages/pre_commit/repository.py\", line 145, in run_hook\r\n    self.cmd_runner, hook, file_args,\r\n  File \"/usr/local/lib/python2.7/site-packages/pre_commit/languages/script.py\", line 23, in run_hook\r\n    encoding=None,\r\n  File \"/usr/local/lib/python2.7/site-packages/pre_commit/prefixed_command_runner.py\", line 40, in run\r\n    replaced_cmd = _replace_cmd(cmd, prefix=self.prefix_dir)\r\n  File \"/usr/local/lib/python2.7/site-packages/pre_commit/prefixed_command_runner.py\", line 11, in _replace_cmd\r\n    return [part.format(**kwargs) for part in cmd]\r\nIndexError: tuple index out of range\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/pre-commit/pre-commit/issues/comments/162387746","html_url":"https://github.com/pre-commit/pre-commit/issues/314#issuecomment-162387746","issue_url":"https://api.github.com/repos/pre-commit/pre-commit/issues/314","id":162387746,"user":{"login":"asottile","id":1810591,"avatar_url":"https://avatars.githubusercontent.com/u/1810591?v=3","gravatar_id":"","url":"https://api.github.com/users/asottile","html_url":"https://github.com/asottile","followers_url":"https://api.github.com/users/asottile/followers","following_url":"https://api.github.com/users/asottile/following{/other_user}","gists_url":"https://api.github.com/users/asottile/gists{/gist_id}","starred_url":"https://api.github.com/users/asottile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asottile/subscriptions","organizations_url":"https://api.github.com/users/asottile/orgs","repos_url":"https://api.github.com/users/asottile/repos","events_url":"https://api.github.com/users/asottile/events{/privacy}","received_events_url":"https://api.github.com/users/asottile/received_events","type":"User","site_admin":false},"created_at":"2015-12-07T01:54:59Z","updated_at":"2015-12-07T01:54:59Z","body":"Yeah, I'm going to do that.  See #315 "}}