Skip to content

Commit bc06ec9

Browse files
committed
incus copy: keep type=none as single device info - fixes validation
Signed-off-by: Jan Hacker <[email protected]>
1 parent ade74c2 commit bc06ec9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cmd/incus/copy.go

+2
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ func (c *cmdCopy) copyInstance(conf *config.Config, sourceResource string, destR
203203
for k, m := range deviceMap {
204204
if m["type"] == "none" {
205205
delete(entry.Devices, k)
206+
entry.Devices[k] = map[string]string{"type": "none"}
206207
continue
207208
}
208209

@@ -300,6 +301,7 @@ func (c *cmdCopy) copyInstance(conf *config.Config, sourceResource string, destR
300301
for k, m := range deviceMap {
301302
if m["type"] == "none" {
302303
delete(entry.Devices, k)
304+
entry.Devices[k] = map[string]string{"type": "none"}
303305
continue
304306
}
305307

0 commit comments

Comments
 (0)