create-cookbook 1.0.0-beta.73 → 1.0.0-beta.74
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/index.mjs +10 -3
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -157,18 +157,25 @@ const color = gradient(["cyan", "#2d9b87"]);
|
|
|
157
157
|
const targetFile = join(targetPath, "co");
|
|
158
158
|
if (existsSync(targetFile)) rmSync(targetFile);
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
try {
|
|
161
|
+
consola.info(color(`Moving executable to PATH: ${targetPath}`));
|
|
162
|
+
await move(execPath, targetFile, { overwrite: true });
|
|
163
|
+
} catch (error) {
|
|
164
|
+
consola.error(color(`Installation failed: ${error?.message}`));
|
|
165
|
+
exit(1);
|
|
166
|
+
}
|
|
161
167
|
|
|
162
168
|
try {
|
|
163
169
|
execFileSync("chmod", ["+x", targetFile]);
|
|
164
170
|
consola.success(color("Executable permissions set"));
|
|
165
171
|
} catch (error) {
|
|
166
|
-
consola.
|
|
172
|
+
consola.error(color(`Permission setting failed: ${error?.message}`));
|
|
173
|
+
exit(1);
|
|
167
174
|
}
|
|
168
175
|
}
|
|
169
176
|
}
|
|
170
177
|
|
|
171
|
-
consola.start(color("Cleaning temporary files"));
|
|
178
|
+
consola.start(color("Cleaning temporary files.."));
|
|
172
179
|
try {
|
|
173
180
|
await remove(tempspace);
|
|
174
181
|
consola.success(color("Installation complete"));
|