Skip to content

Commit afdaf90

Browse files
committed
Improve Trellis project detection
1 parent 0295d39 commit afdaf90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

trellis/trellis.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (t *Trellis) Detect() []string {
4343

4444
if len(parent) == 1 {
4545
if parent == "." || os.IsPathSeparator(parent[0]) {
46-
log.Fatalln("Could not detect a Trellis project")
46+
return []string{}
4747
}
4848
}
4949

@@ -104,7 +104,7 @@ func (t *Trellis) Valid() bool {
104104

105105
func (t *Trellis) EnforceValid(ui cli.Ui) {
106106
if !t.Valid() {
107-
ui.Error("No Trellis project detected. This command must be run in the root of a Trellis project.")
107+
ui.Error("No Trellis project detected in the current directory or any of its parent directories.")
108108
os.Exit(1)
109109
}
110110
}

0 commit comments

Comments
 (0)