diff --git a/vendor/github.com/hashicorp/hcl/appveyor.yml b/vendor/github.com/hashicorp/hcl/appveyor.yml index 3c8cdf8e9..4db0b7112 100644 --- a/vendor/github.com/hashicorp/hcl/appveyor.yml +++ b/vendor/github.com/hashicorp/hcl/appveyor.yml @@ -4,7 +4,7 @@ clone_folder: c:\gopath\src\github.com\hashicorp\hcl environment: GOPATH: c:\gopath init: - - git config --global core.autocrlf true + - git config --global core.autocrlf false install: - cmd: >- echo %Path% diff --git a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go index 6e54bed97..b4881806e 100644 --- a/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go +++ b/vendor/github.com/hashicorp/hcl/hcl/parser/parser.go @@ -3,6 +3,7 @@ package parser import ( + "bytes" "errors" "fmt" "strings" @@ -36,6 +37,11 @@ func newParser(src []byte) *Parser { // Parse returns the fully parsed source and returns the abstract syntax tree. func Parse(src []byte) (*ast.File, error) { + // normalize all line endings + // since the scanner and output only work with "\n" line endings, we may + // end up with dangling "\r" characters in the parsed data. + src = bytes.Replace(src, []byte("\r\n"), []byte("\n"), -1) + p := newParser(src) return p.Parse() } diff --git a/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go b/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go index a296fc851..6617ab8e7 100644 --- a/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go +++ b/vendor/github.com/hashicorp/hcl/hcl/printer/printer.go @@ -62,6 +62,5 @@ func Format(src []byte) ([]byte, error) { // Add trailing newline to result buf.WriteString("\n") - return buf.Bytes(), nil } diff --git a/vendor/github.com/hashicorp/hcl/json/parser/parser.go b/vendor/github.com/hashicorp/hcl/json/parser/parser.go index 6f4608530..125a5f072 100644 --- a/vendor/github.com/hashicorp/hcl/json/parser/parser.go +++ b/vendor/github.com/hashicorp/hcl/json/parser/parser.go @@ -147,7 +147,7 @@ func (p *Parser) objectKey() ([]*ast.ObjectKey, error) { // Done return keys, nil case token.ILLEGAL: - fmt.Println("illegal") + return nil, errors.New("illegal") default: return nil, fmt.Errorf("expected: STRING got: %s", p.tok.Type) } diff --git a/vendor/vendor.json b/vendor/vendor.json index 7429ad0f2..b40002ee5 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -2072,70 +2072,70 @@ "revisionTime": "2016-08-13T22:13:03Z" }, { - "checksumSHA1": "Ok3Csn6Voou7pQT6Dv2mkwpqFtw=", + "checksumSHA1": "o3XZZdOnSnwQSpYw215QV75ZDeI=", "path": "github.com/hashicorp/hcl", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { "checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=", "path": "github.com/hashicorp/hcl/hcl/ast", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { "checksumSHA1": "DaQmLi48oUAwctWcX6A6DNN61UY=", "path": "github.com/hashicorp/hcl/hcl/fmtcmd", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { - "checksumSHA1": "MGYzZActhzSs9AnCx3wrEYVbKFg=", + "checksumSHA1": "teokXoyRXEJ0vZHOWBD11l5YFNI=", "path": "github.com/hashicorp/hcl/hcl/parser", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { - "checksumSHA1": "gKCHLG3j2CNs2iADkvSKSNkni+8=", + "checksumSHA1": "WR1BjzDKgv6uE+3ShcDTYz0Gl6A=", "path": "github.com/hashicorp/hcl/hcl/printer", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { "checksumSHA1": "z6wdP4mRw4GVjShkNHDaOWkbxS0=", "path": "github.com/hashicorp/hcl/hcl/scanner", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { "checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=", "path": "github.com/hashicorp/hcl/hcl/strconv", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { "checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=", "path": "github.com/hashicorp/hcl/hcl/token", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { - "checksumSHA1": "138aCV5n8n7tkGYMsMVQQnnLq+0=", + "checksumSHA1": "PwlfXt7mFS8UYzWxOK5DOq0yxS0=", "path": "github.com/hashicorp/hcl/json/parser", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { "checksumSHA1": "YdvFsNOMSWMLnY6fcliWQa0O5Fw=", "path": "github.com/hashicorp/hcl/json/scanner", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { "checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=", "path": "github.com/hashicorp/hcl/json/token", - "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b", - "revisionTime": "2017-02-17T16:47:38Z" + "revision": "a4b07c25de5ff55ad3b8936cea69a79a3d95a855", + "revisionTime": "2017-05-04T19:02:34Z" }, { "checksumSHA1": "2Nrl/YKrmowkRgCDLhA6UTFgYEY=",