Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

accept env as JSON

  • Loading branch information...
commit c545a239502be22bf02aa86b06a7a87912f2c8b3 1 parent 29c296d
@ddollar authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  README.md
  2. +1 −1  lib/builder.coffee
View
2  README.md
@@ -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
2  lib/builder.coffee
@@ -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... "
Please sign in to comment.
Something went wrong with that request. Please try again.