pulumi/pkg
Chris Smith bd5e54d63e
Fix panic when using commands w/o Pulumi.yaml (#492)
Calls to `NewProjectWorkspace` will panic if there is no Pulumi.yaml found in the folder hierarchy. Simple repo:

```
git init
pulumi init
pulumi stack init x
```

`DetectPackage` will search until it gets to the `.pulumi` directory or finds a `Pulumi.yaml` file. In the case of the former, we pass "" to `LoadPackage` which then asserts because the file doesn't exist.

We now detect this condition and surface an error to the user. The error text is patterned after running a git command when there is no .git folder found:

fatal: Not a git repository (or any of the parent directories): .git
2017-10-28 18:07:03 -07:00
..
apitype Enable 'pulumi stack init' to the Cloud (#480) 2017-10-26 22:14:56 -07:00
compiler/errors Use Stack over Environment to describe a deployment target 2017-10-16 13:04:20 -07:00
diag Use Fprint, not Fprintf, so we don't format messages 2017-10-26 10:30:30 -07:00
encoding Use go-yaml directly 2017-10-20 14:01:37 -07:00
engine Merge pull request #448 from pulumi/TwoPhaseSnapshot 2017-10-23 10:27:30 -07:00
graph Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
pack Encrypt secrets in Pulumi.yaml 2017-10-24 16:48:12 -07:00
resource Fix where integration tests look for checkpoints 2017-10-27 19:42:17 -07:00
testing/integration Add minimal runtime verification test 2017-10-27 20:03:38 -07:00
tokens Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
tools Rename pulumi-fabric to pulumi 2017-09-21 19:18:21 -07:00
util Move .pulumi to root of a repository 2017-10-27 11:46:21 -07:00
workspace Fix panic when using commands w/o Pulumi.yaml (#492) 2017-10-28 18:07:03 -07:00