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.
Files changed (2) hide show
  1. package/index.mjs +10 -3
  2. 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
- await move(execPath, targetFile, { overwrite: true });
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.warn(color(`Permission setting failed: ${error.message}`));
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"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cookbook",
3
- "version": "1.0.0-beta.73",
3
+ "version": "1.0.0-beta.74",
4
4
  "main": "index.mjs",
5
5
  "bin": {
6
6
  "create-cookbook": "./index.mjs"