mirror of
https://github.com/xtool-org/xtool.git
synced 2026-02-04 11:53:30 +01:00
Running an invalid `sdk` subcommand like `xtool sdk list` (there's no `list` subcommand) is interpreted as "install the sdk at path `./list`". We previously unconditionally removed the existing SDK during installation. By switching the order so that we validate the path first, we avoid performing a potentially destructive action unless we have clear intent. See #186. Before: ```bash $ xtool sdk list Removing existing SDK... # destructive! Error: Could not read file or directory at path 'list'. ``` After: ```bash $ xtool sdk list Error: Could not read file or directory at path 'list'. See 'xtool help sdk' for usage. ```