Permalink
Browse files

accept env as JSON

  • Loading branch information...
1 parent 29c296d commit c545a239502be22bf02aa86b06a7a87912f2c8b3 @ddollar committed Jul 19, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 README.md
  2. +1 −1 lib/builder.coffee
View
@@ -50,7 +50,7 @@ Applications are described by a manifest, in JSON format:
$ curl -v -X POST https://anvil.herokuapp.com/manifest \
-d "manifest=$(cat manifest.json)" \
-d "buildpack=https%3A%2F%2Fbuildkit.herokuapp.com%2Fbuildkit%2Fdefault.tgz" \
- -d "env[FOO]=bar"
+ -d "env={'FOO':'bar'}"
* Connected to anvil.herokuapp.com (107.20.215.233) port 443 (#0)
> POST /manifest/build HTTP/1.1
< HTTP/1.1 100 Continue
View
@@ -22,7 +22,7 @@ class Builder
SLUG_URL: @slug_url()
SLUG_PUT_URL: slug_put_url
SOURCE_URL: source
- env[key] = val for key, val of options.env
+ env[key] = val for key, val of JSON.parse(options.env || "{}")
builder = @spawner.spawn("bin/compile $(bin/fetch $SOURCE_URL)", env:env)
cb builder, this
builder.emit "data", "Launching build process... "

0 comments on commit c545a23

Please sign in to comment.