VS Code Extension Uninstall SDK Deleting parent directories

Both myself and a colleague  had an issue in the past 48 hours where upon launch we were prompted to install a new West workspace/SDK.   In my case it "tricked" me into installing a 2.9 SDK locally when my product is stuck on 2.7.   Realizing my mistake I chose to uninstall the SDK from local directory (my regular SDK is in /opt/nordic).  Unfortunately for both of us the uninstall process deleted the entire PARENT directory of the SDK.   In my case it wiped a source directory containing dozens of gitlab clones and some uncommitted code for other projects.   Obviously this was disruptive.  Has anyone else seen uninstall of local SDKs by the VS Code Extension deleting parent directories?  

Parents Reply Children
  • Here are clean steps to reproduce:

    ZEPHYR_BASE=/opt/nordic/ncs/v2.7.0/zephyr

    NCS_ROOT_PATH=/opt/nordic/ncs

    1. $ mkdir ~/example/parent

    2. $ cd ~/example/parent

    3 $ git clone github.com/.../ncs-example-application.git

    4. Open VS Code

    5. Open project ~/example/parent/ncs-example-application

    6. Popup dialog about finding west workspace.  Click blue button.

    7. Popup dialog about west workspace.  Click blue update button.

    8. After a minute or so cancel the update; you don't need to wait for all of the files to download

    *Expected results* 

    Latest 2.9.0 SDK is installed somewhere in ~/example/parent/ncs-example-application

    *Actual results*

    ls -al ~/example/parent/
    total 16
    drwxr-xr-x 11 eschnell staff 352 Feb 4 08:35 .
    drwxr-xr-x 4 eschnell staff 128 Feb 4 08:26 ..
    -rw-r--r--@ 1 eschnell staff 6148 Feb 4 08:34 .DS_Store
    drwxr-xr-x 3 eschnell staff 96 Feb 4 08:34 .west
    drwxr-xr-x 3 eschnell staff 96 Feb 4 08:35 bootloader
    drwxr-xr-x 5 eschnell staff 160 Feb 4 08:35 modules
    drwxr-xr-x 21 eschnell staff 672 Feb 4 08:32 ncs-example-application
    drwxr-xr-x 40 eschnell staff 1280 Feb 4 08:34 nrf
    drwxr-xr-x 32 eschnell staff 1024 Feb 4 08:35 nrfxlib
    drwxr-xr-x 3 eschnell staff 96 Feb 4 08:35 tools
    drwxr-xr-x 50 eschnell staff 1600 Feb 4 08:35 zephyr

    At this point if I choose to uninstall the SDK (with project ~/example/parent/ncs-example-application open in VS Code) it will delete the entire directory ~/example/parent 

Related