@kyma-api/agent 0.1.3 → 0.1.5

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.
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { execFileSync } from "child_process";
4
+ import { existsSync } from "fs";
5
+ import { join } from "path";
6
+ import os from "os";
7
+
8
+ const binary = join(os.homedir(), ".kyma", "ter", "bin", "kyma-ter");
9
+
10
+ if (!existsSync(binary)) {
11
+ console.error("kyma-ter binary not found.");
12
+ console.error("Try reinstalling: npm install -g @kyma-api/agent");
13
+ console.error("Or download manually from https://kymaapi.com/ter");
14
+ process.exit(1);
15
+ }
16
+
17
+ try {
18
+ execFileSync(binary, process.argv.slice(2), { stdio: "inherit" });
19
+ } catch (err) {
20
+ process.exit(err.status || 1);
21
+ }