Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Running outside of GOPATH fails #375

Closed
nathankerr opened this issue Apr 11, 2017 · 4 comments
Closed

Running outside of GOPATH fails #375

nathankerr opened this issue Apr 11, 2017 · 4 comments

Comments

@nathankerr
Copy link

got:

$ buffalo version
2017/04/11 08:00:33 couldn't unmarshal config to yaml: yaml: unmarshal errors:
  line 1: cannot unmarshal !!str `diff --...` into map[string]*pop.ConnectionDetails

expected:

$ buffalo version
Buffalo version is: 0.8.1
@nathankerr
Copy link
Author

Further investigation yields that buffalo is looking for a database.yml in parent directories and then fails with this unhelpful error message.

There is no failure when there is not a database.yml in the directory tree.

@markbates
Copy link
Member

I can't reproduce. If I run buffalo version out side of my $GOPATH, like my home directory, I get Buffalo version is: 0.8.1.

Can you give me more information on how to reproduce?

@nathankerr
Copy link
Author

$ cd $HOME
$ mkdir buffalo-test
$ cd buffalo-test
$ echo diff >> database.yml
$ mkdir other
$ cd other
$ buffalo version
2017/04/11 14:04:26 couldn't unmarshal config to yaml: yaml: unmarshal errors:
  line 1: cannot unmarshal !!str `diff` into map[string]*pop.ConnectionDetails
$ cd $HOME
$ buffalo version
Buffalo version is: 0.8.1
$

This came about because I working on creating an easy to update tutorial for buffalo and happened to name my diff file for database.yml as database.yml. Since a diff is not valid yaml it could not be parsed as yaml.

I only figured out the database.yml part after I created the issue.

@markbates
Copy link
Member

Weird bug, but found, and fixed. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants