@orxataguy/tyr 1.0.10-beta.6 → 1.0.10-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orxataguy/tyr",
3
- "version": "1.0.10-beta.6",
3
+ "version": "1.0.10-beta.8",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "tyr": "./bin/tyr.js"
@@ -41,10 +41,9 @@ export class SetupManager {
41
41
  : [['apk', 'apk'], ['apt-get', 'apt'], ['brew', 'brew'], ['dnf', 'dnf']];
42
42
 
43
43
  for (const [bin, name] of candidates) {
44
- const found = await this.shell.exec(
45
- `which ${bin} 2>/dev/null && echo yes || echo no`
46
- ).catch(() => 'no');
47
- if (found.trim() === 'yes') return name;
44
+ const found = await this.shell.exec(`which ${bin} >/dev/null 2>&1`)
45
+ .then(() => true).catch(() => false);
46
+ if (found) return name;
48
47
  }
49
48
  return 'unknown';
50
49
  }
@@ -85,10 +84,8 @@ export class SetupManager {
85
84
  * if (!await setup.binExists('docker')) fail('Docker is required.');
86
85
  */
87
86
  public async binExists(bin: string): Promise<boolean> {
88
- const result = await this.shell.exec(
89
- `which ${bin} 2>/dev/null && echo yes || echo no`
90
- ).catch(() => 'no');
91
- return result.trim() === 'yes';
87
+ return this.shell.exec(`which ${bin} >/dev/null 2>&1`)
88
+ .then(() => true).catch(() => false);
92
89
  }
93
90
 
94
91
  // ── docker-compose file introspection ───────────────────────────────────