Skip to content

Commit a46e587

Browse files
committed
added exit condition if no modules were parsed
1 parent 6714814 commit a46e587

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/export.go

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ var exportCmd = &cobra.Command{
4141
if err := ms.Read(viper.GetString("module")); err != nil {
4242
log.Fatal(err)
4343
}
44+
if len(ms.Modules) == 0 {
45+
log.Fatal("no modules found, exporting from submodules is not yet supported")
46+
}
4447
var mn string // module name
4548
// at this moment ms contains only one module
4649
// which was read by the path provided within -m flag

0 commit comments

Comments
 (0)