Skip to content

An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.

fix: parse-prd with --input parameter not working (#1464)

Ralph Khreish67a0fe6ccd65
diff --git a/package-lock.json b/package-lock.json
index 1f68c2ac..b11803a5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "task-master-ai",
- "version": "0.36.0-rc.1",
+ "version": "0.36.0-rc.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "task-master-ai",
- "version": "0.36.0-rc.1",
+ "version": "0.36.0-rc.2",
"license": "MIT WITH Commons-Clause",
"workspaces": [
"apps/*",
@@ -204,7 +204,7 @@
"react-dom": "^19.0.0",
"tailwind-merge": "^3.3.1",
"tailwindcss": "4.1.11",
- "task-master-ai": "0.36.0-rc.1",
+ "task-master-ai": "0.36.0-rc.2",
"typescript": "^5.9.2"
},
"engines": {
diff --git a/packages/tm-core/src/modules/integration/services/export.service.ts b/packages/tm-core/src/modules/integration/services/export.service.ts
index c00f24d2..085077dd 100644
--- a/packages/tm-core/src/modules/integration/services/export.service.ts
+++ b/packages/tm-core/src/modules/integration/services/export.service.ts
@@ -1537,14 +1537,47 @@ export class ExportService {
const jsonData = (await response.json()) as SendTeamInvitationsResponse;
if (!response.ok || !jsonData.success) {
+ // Check if all users are already members - this is not an error
+ const invitations = jsonData.invitations || (jsonData as any)?.data;
+ const jsonError = (jsonData as any)?.error;
+
+ // Handle "already member" as success - check both invitations array and error message
+ const isAlreadyMember =
+ (invitations &&
+ Array.isArray(invitations) &&
+ invitations.length > 0 &&
+ invitations.every(
+ (inv: { status: string }) => inv.status === 'already_member'
+ )) ||
+ (jsonError?.code === 'invitation_failed' &&
+ jsonError?.message?.toLowerCase().includes('already member'));
+
+ if (isAlreadyMember) {
+ // Return success with synthetic invitations if we only got an error
+ const resultInvitations =
+ invitations ||
+ emails.map((email) => ({
+ email,
+ status: 'already_member' as const
+ }));
+ return {
+ success: true,
+ invitations: resultInvitations
+ };
+ }
+
+ const errorMessage =
+ (jsonData as any)?.message ||
+ (typeof jsonError === 'string'
+ ? jsonError
+ : jsonError?.message || JSON.stringify(jsonError)) ||
+ `Failed to send invitations: ${response.status}`;
+
return {
success: false,
error: {
code: 'API_ERROR',
- message:
- (jsonData as any)?.message ||
- (jsonData as any)?.error ||
- `Failed to send invitations: ${response.status}`
+ message: errorMessage
}
};
}
diff --git a/scripts/modules/commands.js b/scripts/modules/commands.js
index abd9b776..fe7d0230 100644
--- a/scripts/modules/commands.js
+++ b/scripts/modules/commands.js
@@ -934,11 +934,14 @@ function registerCommands(programInstance) {
)
.option('--tag <tag>', 'Specify tag context for task operations')
.action(async (file, options) => {
+ // Resolve PRD path: prioritize --input option, then positional argument
+ const prdPath = options.input || file;
+
// Initialize TaskMaster
let taskMaster;
try {
const initOptions = {
- prdPath: file || options.input || true,
+ prdPath: prdPath || true,
tag: options.tag
};
// Only include tasksPath if output is explicitly specified
@@ -978,7 +981,7 @@ function registerCommands(programInstance) {
const collaborationChoice = await promptHamsterCollaboration();
if (collaborationChoice === 'hamster') {
// User chose Hamster - send PRD to Hamster for brief creation
- await handleParsePrdToHamster(file);
+ await handleParsePrdToHamster(taskMaster.getPrdPath());
return;
}