Skip to content

Commit

Permalink
Merge pull request #2 for v0.5.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeevatkm authored Jun 25, 2018
2 parents a4e8eb5 + 50ad180 commit dd8ea2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion forge.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ import (
)

// Version represent current release version of forge.
var Version = "0.5"
var Version = "0.5.1"

// ParseBytes takes a []byte representation of the config file, parses it
// and responds with `*Section` and potentially an `error` if it cannot
Expand Down
6 changes: 5 additions & 1 deletion parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ func (parser *Parser) parseInclude() error {

// if it is not absolute path, resolve to relative from parent config directory
if !filepath.IsAbs(pattern) && len(parser.files) > 0 {
pattern = path.Join(path.Dir(parser.files[0]), path.Clean(pattern))
if parser.vfs == nil {
pattern = filepath.Join(filepath.Dir(parser.files[0]), filepath.Clean(pattern))
} else {
pattern = path.Join(path.Dir(parser.files[0]), path.Clean(pattern))
}
}

filenames, err := vfs.Glob(parser.vfs, pattern)
Expand Down

0 comments on commit dd8ea2d

Please sign in to comment.