diff --git a/cmd/utils/utils.go b/cmd/utils/utils.go index 48f3227..1bc0d00 100644 --- a/cmd/utils/utils.go +++ b/cmd/utils/utils.go @@ -220,7 +220,7 @@ func CheckConnection(url string, timeOut int) error { // FileExists checks if filePath is an actual file in the local file system func FileExists(filePath string) bool { info, err := os.Stat(filePath) - if os.IsNotExist(err) { + if info == nil || os.IsNotExist(err) { return false } return !info.IsDir() diff --git a/testdata/devpack_Install/TheVendor.ThePack.1.2.3.pack b/testdata/devpack_Install/TheVendor.ThePack.1.2.3.pack new file mode 100644 index 0000000..341dc7e Binary files /dev/null and b/testdata/devpack_Install/TheVendor.ThePack.1.2.3.pack differ diff --git a/testdata/devpack_Install/TheVendor.ThePack.1.2.4.pack b/testdata/devpack_Install/TheVendor.ThePack.1.2.4.pack new file mode 100644 index 0000000..fd4a27d Binary files /dev/null and b/testdata/devpack_Install/TheVendor.ThePack.1.2.4.pack differ diff --git a/testdata/devpack_Install/TheVendor.ThePack.pdsc b/testdata/devpack_Install/TheVendor.ThePack.pdsc new file mode 100644 index 0000000..df7ab73 --- /dev/null +++ b/testdata/devpack_Install/TheVendor.ThePack.pdsc @@ -0,0 +1,12 @@ + + + TheVendor + file:///testdata/devpack_Install + ThePack + Sample pack just for testing + + New release. + New release. + Initial release. + +