fix(commands): use specific validation reason in blocked-directory warning

Show the actual reason from validateDirectory (e.g. "Refusing to run in your
home directory" or "Refusing to run in system directory: /usr") instead of a
generic "No project found" message.
This commit is contained in:
Jeremy 2026-03-28 18:17:59 -05:00
parent cb6b9c38d6
commit 567f5242ca

View file

@ -31,7 +31,7 @@ export async function handleGSDCommand(
} catch (err) {
if (err instanceof GSDNoProjectError) {
ctx.ui.notify(
"No project found in this directory. `cd` into a project directory or run `/gsd new-project` to initialize one.",
`${err.message} \`cd\` into a project directory first.`,
"warning",
);
return;