nexscope 1.0.1 → 1.0.2
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 +1 -1
- package/src/commands/install.js +15 -6
package/package.json
CHANGED
package/src/commands/install.js
CHANGED
|
@@ -89,6 +89,10 @@ function runSkillsSync(skillsArgs) {
|
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
function runSkillsSilent(skillsArgs) {
|
|
93
|
+
return spawnAsync('npx', ['skills', ...skillsArgs]);
|
|
94
|
+
}
|
|
95
|
+
|
|
92
96
|
async function run(args) {
|
|
93
97
|
if (args.includes('--help') || args.includes('-h')) {
|
|
94
98
|
printHelp();
|
|
@@ -112,15 +116,20 @@ async function run(args) {
|
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
const installed = await getInstalledSkills(dirFlags);
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
+
|
|
120
|
+
const tasks = new Listr([{
|
|
121
|
+
title: skillName,
|
|
122
|
+
skip: () => installed.includes(skillName) ? 'Already installed' : false,
|
|
123
|
+
task: () => runSkillsSilent(['add', SKILLS_REPO, '--skill', skillName, '-y', ...dirFlags]),
|
|
124
|
+
}], { exitOnError: false });
|
|
125
|
+
|
|
126
|
+
try {
|
|
127
|
+
await tasks.run();
|
|
128
|
+
} catch {
|
|
129
|
+
// error already shown by listr2
|
|
119
130
|
}
|
|
120
131
|
|
|
121
|
-
const code = await runSkillsSync(['add', SKILLS_REPO, '--skill', skillName, '-y', ...dirFlags]);
|
|
122
132
|
printThankYou();
|
|
123
|
-
process.exit(code || 0);
|
|
124
133
|
} else {
|
|
125
134
|
process.stdout.write('Fetching skill list... ');
|
|
126
135
|
const [skills, installed] = await Promise.all([
|