Open-CMSIS-Pack / cpackget

Open-CMSIS-Pack Package Installer
Apache License 2.0
20 stars 13 forks source link

cpackget: path problem when installing local packs #290

Open ReinhardKeil opened 4 months ago

ReinhardKeil commented 4 months ago

cpackget adds the wrong path when drive letter on windows is not specified

To Reproduce Steps to reproduce the behavior:

  1. checkout https://github.com/Open-CMSIS-Pack/csolution-examples and https://github.com/Open-CMSIS-Pack/pack-examples to these Windows directories: c:\w\csolution-examples c:\w\pack-examples
  2. set cd c:\w\csolution-examples as current directory
  3. use cpackget add \w\pack-examples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc

cpackget list now outputs:

`E: Keil.STM32U5xx_DFP@3.0.0-dev0 (installed via C:\w\csolution-examples\CubeMX\w\pack-examples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc ) - error: open C:\w\csolution-examples\CubeMX\w\pack-examples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc: The system cannot find the path specified.

Expected behavior The path is correctly installed as

`I: Keil.STM32U5xx_DFP@3.0.0-dev0 (installed via C:\w\pack-examples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc)

Environment:

ReinhardKeil commented 4 months ago

Adding to this problem: c: works, whereas C: reports an issue (see below).

>cpackget add c:\w\pack-examples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc  
I: Adding pdsc "c:\w\pack-examples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc"

C:\w\csolution-examples>cpackget add C:\w\pack-examples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc  
I: Adding pdsc "C:\w\pack-examples\STM32U5xx_DFP\Keil.STM32U5xx_DFP.pdsc"
W: Found PDSC file with an equal but malformed path (using '\'). Correcting entry and reinstalling.