6 Commits

Author SHA1 Message Date
Kabir Oberai
7a5dfd2ccd Validate SDK before overwriting (#192)
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.
```
2026-01-04 21:55:35 -05:00
Kabir Oberai
836fca8daf Improve tmpdir management (#147)
- We now have a single tmpdir "root" that can be recreated at launch to
clean up old stragglers
- The location of this tmpdir root can be controlled by `XTL_TMPDIR` or
`TMPDIR`. In general the path is `$TMPDIR/sh.xtool`.

With this change it should be possible to `export XTL_TMPDIR=/var/tmp`
if `/tmp` doesn't have enough space, which fixes #23.
2025-08-10 01:43:09 -04:00
Kabir Oberai
0425f9edeb Add SwiftLint (#104)
Closes #72
2025-05-31 19:38:57 +05:30
Kabir Oberai
54d03f525a Improve SDK handling (#40)
* Use swift-sdk commands instead of file ops

* comment
2025-05-16 00:06:39 +05:30
Kabir Oberai
307df68794 Create sdks directory if needed 2025-05-08 23:41:34 +05:30
Kabir Oberai
7245b34f4f More renaming and regrouping 2025-05-06 12:31:48 +05:30