Skip to content

Commit

Permalink
Cookies should always be an array
Browse files Browse the repository at this point in the history
Fixes #146.
  • Loading branch information
kevva committed Dec 5, 2014
1 parent 4888029 commit 1199bfb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ function parse(args, globalOptions) {
arg = arg._;
delete options._;

if (options.cookie) {
options.cookie = Array.isArray(options.cookie) ? options.cookie : [options.cookie];
}

// plural makes more sense for a programmatic option
options.cookies = options.cookie;
delete options.cookie;
Expand Down
4 changes: 4 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,10 @@ $ pageres [ yeoman.io 1366x768 --no-crop ] todomvc.com 1024x768 --crop

Browser cookie, can be set multiple times.

```sh
$ pageres yeoman.io 1024x768 --cookie 'foo=bar'
```

##### `--username <username>`

Username for HTTP auth.
Expand Down

0 comments on commit 1199bfb

Please sign in to comment.