Commit 9e74f45
committed
fix: installer permission error on macOS
This commit addresses issue #4005 where the one-line installer was
failing on macOS with a PermissionError when attempting to create
a directory named "None".
Changes:
1. Fix external_providers_dir None handling (src/llama_stack/cli/stack/run.py)
- Changed from truthy check to explicit 'is not None' check
- Use Path objects directly instead of str() conversion to avoid
converting None to the string "None"
- Added proper error handling with descriptive messages for
permission errors
- Added logging when creating external providers directory
2. Improve type conversion documentation (src/llama_stack/core/stack.py)
- Added comments explaining that empty strings from env var defaults
are converted to None
- Documented that code must check for None explicitly to avoid
str(None) creating the literal string "None"
Testing performed:
- All unit tests pass (8/8 in test_stack_config.py)
- All pre-commit hooks pass
- Manual testing on Apple M4 (ARM64) with Podman
- Validated that None values are handled properly without string conversion
Fixes #40051 parent 392e01d commit 9e74f45
2 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
180 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
181 | 190 | | |
182 | 191 | | |
183 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
312 | 315 | | |
313 | 316 | | |
314 | 317 | | |
| |||
0 commit comments