We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ddac6ce commit 10c15d4Copy full SHA for 10c15d4
internal/domain/misc.go
@@ -38,6 +38,13 @@ import (
38
39
// List returns the inventory
40
func (d *Domain) List() (inventory.Inventory, error) {
41
+ if d == nil {
42
+ return inventory.Inventory{}, fmt.Errorf("domain not initialized - no active session found. Run 'session init' to begin")
43
+ }
44
+ if d.datastore == nil {
45
+ return inventory.Inventory{}, fmt.Errorf("datastore not initialized - no active session found. Run 'session init' to begin")
46
47
+
48
inv, err := d.datastore.List()
49
if err != nil {
50
return inventory.Inventory{}, err
0 commit comments