You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Fixed a bunch of resources not pre-installing curl and unzip if it doesn't exist. Added fixes for alias, android-studio (linux support), asdf, aws-cli, npm, npm-login, nvm, ollama, pyenv, terraform, uv
**Never use `sudo` inside `$.spawn` or `$.spawnSafe`.** Use `{ requiresRoot: true }` in the options instead. The framework handles privilege escalation through the parent process.
Always use `Utils.installViaPkgMgr(pkg)` from `@codifycli/plugin-core` to install system packages. This is platform-agnostic and automatically dispatches to the correct package manager (Homebrew on macOS, apt on Debian/Ubuntu, etc.). Never hardcode package manager calls like `brew install`, `apt-get install -y`, or `sudo apt install` in resource code.
280
+
281
+
```typescript
282
+
// Correct — works on macOS and Linux
283
+
awaitUtils.installViaPkgMgr('curl');
284
+
awaitUtils.uninstallViaPkgMgr('curl');
285
+
286
+
// Wrong — hardcoded to a specific platform/package manager
287
+
await$.spawn('sudo apt-get install -y curl');
288
+
await$.spawn('brew install curl');
289
+
```
290
+
291
+
This applies to prerequisite checks too. When a resource needs a system dependency (e.g. `curl`, `git`, `make`), always install via `Utils.installViaPkgMgr` rather than spawning a package manager directly.
292
+
293
+
**Imports — `Utils` from plugin-core vs local utils:**
294
+
295
+
Always import `Utils` from `@codifycli/plugin-core`, not from `../../utils` or `../../../utils`. The local `src/utils/` module contains macOS-specific helpers (`findApplication`, `isArmArch`, `isRosetta2Installed`, `downloadUrlIntoFile`, etc.) that are only needed when those specific capabilities are required. For everything else — OS detection, package management, shell utilities — use the plugin-core `Utils`.
296
+
297
+
```typescript
298
+
// Correct
299
+
import { Utils } from'@codifycli/plugin-core';
300
+
301
+
// Only use local utils when you specifically need macOS/spotlight helpers
0 commit comments