File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 22 *
33 * MIT License
44 *
5- * (C) Copyright 2023 Hewlett Packard Enterprise Development LP
5+ * (C) Copyright 2023, 2025 Hewlett Packard Enterprise Development LP
66 *
77 * Permission is hereby granted, free of charge, to any person obtaining a
88 * copy of this software and associated documentation files (the "Software"),
@@ -38,6 +38,13 @@ import (
3838
3939// List returns the inventory
4040func (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+
4148 inv , err := d .datastore .List ()
4249 if err != nil {
4350 return inventory.Inventory {}, err
You can’t perform that action at this time.
0 commit comments