direktiv / vorteil

turn your applications and containers into micro virtual machines
https://direktiv.io
Apache License 2.0
174 stars 13 forks source link

vorteil images tree ./helloworld.vmdk --vpartition panics #56

Closed trentis closed 4 years ago

trentis commented 4 years ago

Problem description

The following command as the title explains panics.

Expected behaviour

List a tree of the vpartition on a disk

Actual behaviour

.\vorteil.exe images tree ..\..\trentis\vorteil\helloworld.vmdk --vpartition
/
panic: runtime error: index out of range [-1]

goroutine 1 [running]:
main.glob..func16(0x2da6780, 0xc00009a3c0, 0x1, 0x2)
        C:/Users/trent/Documents/github.com/vorteil/vorteil/cmd/vorteil/images.go:1186 +0x822
github.com/spf13/cobra.(*Command).execute(0x2da6780, 0xc00009a3a0, 0x2, 0x2, 0x2da6780, 0xc00009a3a0)
        C:/Users/trent/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846 +0x2a4
github.com/spf13/cobra.(*Command).ExecuteC(0x2da42c0, 0x0, 0x16, 0xc000102058)
        C:/Users/trent/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950 +0x350
github.com/spf13/cobra.(*Command).Execute(...)
        C:/Users/trent/go/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887
main.main()
        C:/Users/trent/Documents/github.com/vorteil/vorteil/cmd/vorteil/main.go:39 +0x39
PS C:\Users\trent\Documents\github.com\vorteil\vorteil>

Steps to reproduce

  1. Run this command on any VMDK

System details

Please include details about the system that the issue can be reproduced on, including:

alankm commented 4 years ago

Fixed with 3eba2f2.