@hasnaxyz/hook-checktasks 0.1.1 → 0.1.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/dist/cli.js +12 -7
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -266,21 +266,26 @@ async function resolveTarget(args) {
|
|
|
266
266
|
return { path: fullPath, label: `project (${fullPath})` };
|
|
267
267
|
}
|
|
268
268
|
const cwd = process.cwd();
|
|
269
|
-
|
|
269
|
+
const isRepo = isGitRepo(cwd);
|
|
270
|
+
if (isRepo) {
|
|
270
271
|
console.log(c.green("\u2713"), `Detected git repo: ${c.cyan(cwd)}`);
|
|
271
272
|
return { path: cwd, label: `project (${cwd})` };
|
|
272
273
|
}
|
|
273
|
-
console.log(c.yellow("!"), `
|
|
274
|
-
`)
|
|
274
|
+
console.log(c.yellow("!"), `Current directory: ${c.cyan(cwd)}`);
|
|
275
|
+
console.log(c.dim(` (not a git repository)
|
|
276
|
+
`));
|
|
275
277
|
console.log(`Where would you like to install?
|
|
276
278
|
`);
|
|
277
|
-
console.log(" 1.
|
|
278
|
-
console.log(
|
|
279
|
+
console.log(" 1. Here", c.dim(`(${cwd})`));
|
|
280
|
+
console.log(" 2. Global", c.dim("(~/.claude/settings.json)"));
|
|
281
|
+
console.log(` 3. Enter a different path
|
|
279
282
|
`);
|
|
280
|
-
const choice = await prompt("Choice (1/2): ");
|
|
283
|
+
const choice = await prompt("Choice (1/2/3): ");
|
|
281
284
|
if (choice === "1") {
|
|
282
|
-
return { path:
|
|
285
|
+
return { path: cwd, label: `project (${cwd})` };
|
|
283
286
|
} else if (choice === "2") {
|
|
287
|
+
return { path: "global", label: "global (~/.claude/settings.json)" };
|
|
288
|
+
} else if (choice === "3") {
|
|
284
289
|
const inputPath = await prompt("Path: ");
|
|
285
290
|
if (!inputPath) {
|
|
286
291
|
console.log(c.red("\u2717"), "No path provided");
|