From ffec58a5d2461c81a4d5661b17628dcd2d628c3d Mon Sep 17 00:00:00 2001 From: Thorsten de Buhr Date: Thu, 11 Jan 2024 11:04:00 +0100 Subject: [PATCH 1/3] fixed: crash todo: proper handling of "file:///" for Windows/Linux/Mac --- cmd/utils/utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() From 60c86292f3d0ef34022019be2343deda668eda15 Mon Sep 17 00:00:00 2001 From: Thorsten de Buhr Date: Thu, 11 Jan 2024 11:08:30 +0100 Subject: [PATCH 2/3] added: test packs for local pack --- testdata/devpack_Install/TheVendor.DevPack.pdsc | 11 +++++++++++ .../devpack_Install/TheVendor.ThePack.1.2.3.pack | Bin 0 -> 615 bytes .../devpack_Install/TheVendor.ThePack.1.2.4.pack | Bin 0 -> 616 bytes 3 files changed, 11 insertions(+) create mode 100644 testdata/devpack_Install/TheVendor.DevPack.pdsc create mode 100644 testdata/devpack_Install/TheVendor.ThePack.1.2.3.pack create mode 100644 testdata/devpack_Install/TheVendor.ThePack.1.2.4.pack diff --git a/testdata/devpack_Install/TheVendor.DevPack.pdsc b/testdata/devpack_Install/TheVendor.DevPack.pdsc new file mode 100644 index 0000000..4c5d4ff --- /dev/null +++ b/testdata/devpack_Install/TheVendor.DevPack.pdsc @@ -0,0 +1,11 @@ + + + TheVendor + file:///testdata/devpack/1.2.4/ + DevPack + Sample pack to be installed via pdsc file just for testing + + New release. + Initial release. + + 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 0000000000000000000000000000000000000000..599d82eb622b9dc9ecc875a428501e7251908fe2 GIT binary patch literal 615 zcmWIWW@Zs#0D&oWX<=XnlwbqWhI&SN#`*zJH5_0y=4<}4>oNi*nHU&k;A%oLQo~a7 zQu2%RTvE#d5|gv_3Q~%bTLUk89X1fD75~%jeed=b*{;4V&LWO;k~e7XJN7KEdzq)_ zrfu`{Z?SF@|M+%Zwck0*I~$H((0FmdDzn7%lZkS}E;FZBwVwC3pFb%Z8FD>*&C{>^ z_mx?8mVG`r^~r-;>*ZVC|K2ix>9Kd26H_h!)^WtT-OYW;z%?***w9@@K>-RZaZ;rK@ z_;;7MN%AhzxURUZ>QJ6+hMT(xXXCnUn`Es+r0;FvO5DPb|A0GDYrP293zhb;9a6^v ze%M*@TPG*>@VO^_IizkC9dbf;m++n&bNFq)stD{#_UzKx@4M-@%6`SGT-6<~rd+i6 zn;bIXm8-Y@&R?%H8=m|196QhR85qorO!f@8B0~ilEdo#)5;a^53Sd4Xg9L+S@^5eJ zfSZhuEuW}oyWC=g@e$@?i$IvUAag)$h`HFK6WKPAHi&JFuXog-+Qte>Il$Dx#BdBq JcY~4&0{|Z1&!+$Y literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..1b31b8e4dbbff6ca10d63389894a321d1085448f GIT binary patch literal 616 zcmWIWW@Zs#0D&oWX<=XnlwbqWhI&SNCi($TH5_0yyq~oF^caDXObiS%a5W(rsbQ&k zDfvZuE~#Y!iOJb|1u4bJt%0%LhYdt(#sBb6-?KgQHM`X%zCf13zJtqtNX_1@J4;RV z<`^*1^X1(bXi=1}({Pv@}?j;`&?gHSrWE+O0^qS-STQxoLyBCS8#sifxH}# z&s#j!Yc6&ad1`ee%>Tw(rn4_PloT&q4cnI7o^^J1m|~CE1Kt`%pQlru80S8@z!iR2 zg6lr}^TceOo{JAXdglFfN$=*`>0I8DKKt^*pfn_IxEK_`d`1Qd29dVk z-qry(8GSBD8)m!QVubM#=3<*Q46T3Q9V_ Date: Thu, 11 Jan 2024 11:30:22 +0100 Subject: [PATCH 3/3] updated testdata --- .../TheVendor.ThePack.1.2.3.pack | Bin 615 -> 610 bytes .../TheVendor.ThePack.1.2.4.pack | Bin 616 -> 611 bytes ...ndor.DevPack.pdsc => TheVendor.ThePack.pdsc} | 7 ++++--- 3 files changed, 4 insertions(+), 3 deletions(-) rename testdata/devpack_Install/{TheVendor.DevPack.pdsc => TheVendor.ThePack.pdsc} (62%) diff --git a/testdata/devpack_Install/TheVendor.ThePack.1.2.3.pack b/testdata/devpack_Install/TheVendor.ThePack.1.2.3.pack index 599d82eb622b9dc9ecc875a428501e7251908fe2..341dc7edfe4bed1ec6998e8dae9812452bbcfbdc 100644 GIT binary patch literal 610 zcmWIWW@Zs#U|`^2=#SQp(A>C#O^T6$;RX=IeAL&S_{2o1C7^S3-8{@o#B$Z*RpKGUA6i4yY&`N|El)VcJKEI zH)`I9%(-BdS>k(Yk3z#P!?jm_&)Sn8zlq)Gx$w2_XYOwVnWA^!e34c3Vc+~fD;{S% zpW@{2TeP|+)$P+YKg(!6(ev$|3%o)ScYS70eQ|+R(&xh^lSA`uult{0|MNxEA$5iW zek-Dre|~F_f8KS`#Ph{Pt$mZZnvK7{sL|fDKzCl!zV)spAzc>_c$LWdEWToOpy!z0 z+31qqskJ-@%on{DbqZ;CzxeY8W3feL7L1F-&uqyGTv+hp+}*1WeszS}sR}Gg^j)=R z&-t$7YxXGDv@*xsuv|R-)iyuZA5Px-t-sQZOX?dXeDk?Z=m!8plM5Jb3=E$)JPZOe zpaeIA3`22ZZb43Jd|GBsYG?>21M|(adkG+1TEWf0$nt`jfdNbecr!BDGvJC86{vv< zP#Sv_aWO#T85txPc!C07SGe3_gwYcOb-L#`-(m#WBgc%(xe`$G85p)S`T>&zisM-! Wj>m8~D;r1`6AoNi*nHU&k;A%oLQo~a7 zQu2%RTvE#d5|gv_3Q~%bTLUk89X1fD75~%jeed=b*{;4V&LWO;k~e7XJN7KEdzq)_ zrfu`{Z?SF@|M+%Zwck0*I~$H((0FmdDzn7%lZkS}E;FZBwVwC3pFb%Z8FD>*&C{>^ z_mx?8mVG`r^~r-;>*ZVC|K2ix>9Kd26H_h!)^WtT-OYW;z%?***w9@@K>-RZaZ;rK@ z_;;7MN%AhzxURUZ>QJ6+hMT(xXXCnUn`Es+r0;FvO5DPb|A0GDYrP293zhb;9a6^v ze%M*@TPG*>@VO^_IizkC9dbf;m++n&bNFq)stD{#_UzKx@4M-@%6`SGT-6<~rd+i6 zn;bIXm8-Y@&R?%H8=m|196QhR85qorO!f@8B0~ilEdo#)5;a^53Sd4Xg9L+S@^5eJ zfSZhuEuW}oyWC=g@e$@?i$IvUAag)$h`HFK6WKPAHi&JFuXog-+Qte>Il$Dx#BdBq JcY~4&0{|Z1&!+$Y diff --git a/testdata/devpack_Install/TheVendor.ThePack.1.2.4.pack b/testdata/devpack_Install/TheVendor.ThePack.1.2.4.pack index 1b31b8e4dbbff6ca10d63389894a321d1085448f..fd4a27d78b3a4018e2f5cafd2ee394a4a49752ee 100644 GIT binary patch literal 611 zcmWIWW@Zs#U|`^2SP`uqk)C;}L7I_);RXBvx;E47kewDPuX`uCKB>T86*Znsci*;e-XVCa(Hvx>f-cGE8gYPvCNUo17~4VukhEVbJt z|H9RmY%*DnO7G%J-iUR>taI9k<2=01((BJKHZ=6 zwB9*0WO>2NzyKx!ycwD78F0ml3e-Ra zD2+XixELVvj0_SCP2Of~l`gj!VRTCO<3)3vZ!v=Gkz>Z?TnVW83=CTu{ekHL#qq2V W$7490l?|ke2?%!r=_x>M3=9DAkJd8) literal 616 zcmWIWW@Zs#0D&oWX<=XnlwbqWhI&SNCi($TH5_0yyq~oF^caDXObiS%a5W(rsbQ&k zDfvZuE~#Y!iOJb|1u4bJt%0%LhYdt(#sBb6-?KgQHM`X%zCf13zJtqtNX_1@J4;RV z<`^*1^X1(bXi=1}({Pv@}?j;`&?gHSrWE+O0^qS-STQxoLyBCS8#sifxH}# z&s#j!Yc6&ad1`ee%>Tw(rn4_PloT&q4cnI7o^^J1m|~CE1Kt`%pQlru80S8@z!iR2 zg6lr}^TceOo{JAXdglFfN$=*`>0I8DKKt^*pfn_IxEK_`d`1Qd29dVk z-qry(8GSBD8)m!QVubM#=3<*Q46T3Q9V_ TheVendor - file:///testdata/devpack/1.2.4/ - DevPack - Sample pack to be installed via pdsc file just for testing + file:///testdata/devpack_Install + ThePack + Sample pack just for testing New release. + New release. Initial release.