@only1btayy/g2w 1.0.6 → 1.0.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/lib/install.js +10 -1
- package/package.json +1 -1
package/lib/install.js
CHANGED
|
@@ -2,6 +2,15 @@ const fs = require('fs');
|
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const os = require('os');
|
|
4
4
|
const { LOGO } = require('./logo');
|
|
5
|
+
|
|
6
|
+
function writeTTY(text) {
|
|
7
|
+
try {
|
|
8
|
+
const { spawnSync } = require('child_process');
|
|
9
|
+
spawnSync(process.execPath, ['-e', `process.stdout.write(${JSON.stringify(text)})`], { stdio: 'inherit' });
|
|
10
|
+
} catch {
|
|
11
|
+
process.stderr.write(text);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
5
14
|
const SKILLS_SRC = path.join(__dirname, '../skills');
|
|
6
15
|
|
|
7
16
|
const G2W_HOOKS = {
|
|
@@ -113,7 +122,7 @@ async function run() {
|
|
|
113
122
|
const { dest, count } = copySkills(base);
|
|
114
123
|
const settingsPath = mergeHooks(base);
|
|
115
124
|
|
|
116
|
-
|
|
125
|
+
writeTTY(`${LOGO}
|
|
117
126
|
\x1b[32m✅ G2W installed at ${label}\x1b[0m
|
|
118
127
|
|
|
119
128
|
${count} skills → ${path.join(label, 'skills/g2w/')}
|