Improve error message when Pulumi.yaml can't be found

Fixes #2234
This commit is contained in:
Matt Ellis 2018-12-05 14:00:14 -08:00
parent 7b74f3b1be
commit ad78f3ef59
3 changed files with 8 additions and 2 deletions

View file

@ -1,5 +1,9 @@
## 0.16.8 (Unreleased)
### Improvements
- Update the error message when When `pulumi` commands fail to detect your project to mention that `pulumi new` can be used to create a new project (fixes [pulumi/pulumi#2234](https://github.com/pulumi/pulumi/issues/2234))
## 0.16.7 (Release December 5th, 2018)
### Improvements

View file

@ -286,7 +286,8 @@ func readProject() (*workspace.Project, string, error) {
"could not locate Pulumi.yaml project file (searching upwards from %s)", pwd)
} else if path == "" {
return nil, "", errors.Errorf(
"no Pulumi.yaml project file found (searching upwards from %s)", pwd)
"no Pulumi.yaml project file found (searching upwards from %s). If you have not "+
"created a project yet, use `pulumi new` to do so", pwd)
}
proj, err := workspace.LoadProject(path)
if err != nil {

View file

@ -89,7 +89,8 @@ func NewFrom(dir string) (W, error) {
if err != nil {
return nil, err
} else if path == "" {
return nil, errors.New("no Pulumi.yaml project file found")
return nil, errors.Errorf("no Pulumi.yaml project file found (searching upwards from %s). If you have not "+
"created a project yet, use `pulumi new` to do so", dir)
}
proj, err := LoadProject(path)