{"record":{"id":"71671d9f2bb1581c","repo":"laurent22/joplin","slug":"please-specify-the-sync-target-path","errorCode":null,"errorMessage":"Please specify the sync target path.","messagePattern":"Please specify the sync target path\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/app-cli/app/command-e2ee.ts","lineNumber":177,"sourceCode":"\n\t\t// if (args.command === 'generate-ppk') {\n\t\t// \tconst syncInfo = localSyncInfo();\n\t\t// \tif (syncInfo.ppk) throw new Error('This account already has a public-private key pair');\n\n\t\t// \tconst argPassword = options.password ? options.password.toString() : '';\n\t\t// \tif (!argPassword) throw new Error('Password must be provided'); // TODO: should get from prompt\n\t\t// \tconst ppk = await generateKeyPair(EncryptionService.instance(), argPassword);\n\n\t\t// \tsyncInfo.ppk = ppk;\n\t\t// \tsaveLocalSyncInfo(syncInfo);\n\t\t// \tawait Setting.saveAll();\n\t\t// }\n\n\t\tif (args.command === 'target-status') {\n\t\t\tconst fs = require('fs-extra');\n\n\t\t\tconst targetPath = args.path;\n\t\t\tif (!targetPath) throw new Error('Please specify the sync target path.');\n\n\t\t\tconst dirPaths = function(targetPath: string) {\n\t\t\t\tconst paths: string[] = [];\n\t\t\t\t// eslint-disable-next-line github/array-foreach -- Old code before rule was applied\n\t\t\t\tfs.readdirSync(targetPath).forEach((path: string) => {\n\t\t\t\t\tpaths.push(path);\n\t\t\t\t});\n\t\t\t\treturn paths;\n\t\t\t};\n\n\t\t\tlet itemCount = 0;\n\t\t\tlet resourceCount = 0;\n\t\t\tlet encryptedItemCount = 0;\n\t\t\tlet encryptedResourceCount = 0;\n\t\t\tlet otherItemCount = 0;\n\n\t\t\tconst encryptedPaths = [];\n\t\t\tconst decryptedPaths = [];","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/laurent22/joplin/blob/2654b33620775080d1d59c552259d41e33dad3d2/packages/app-cli/app/command-e2ee.ts#L159-L195","documentation":"In the 'e2ee target-status' sub-command, the target sync path is read from args.path. If no path was supplied the command throws 'Please specify the sync target path.' Note this message is NOT wrapped in _(), so it is not i18n-translated unlike most others.","triggerScenarios":"Running 'e2ee target-status' without a -p/--path argument pointing at the local-filesystem sync target directory.","commonSituations":"Forgetting the path flag; using a sync target type (e.g. WebDAV/OneDrive) for which target-status does not apply; misreading the help text.","solutions":["Supply the path: 'e2ee target-status -p /path/to/sync/target'.","Run 'e2ee target-status --help' to confirm the expected flag.","Ensure the directory exists and is the configured filesystem sync target."],"exampleFix":"# before\n#   joplin e2ee target-status\n# after\n#   joplin e2ee target-status -p /home/me/JoplinSync","handlingStrategy":"validation","validationCode":"if (args.command === 'target-status' && !args.path) {\n  throw new Error('Usage: e2ee target-status -p <sync-target-path>');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass -p/--path to 'e2ee target-status'.","Confirm the path is the configured filesystem sync target before inspecting it.","Check 'e2ee target-status --help' for the expected flag spelling."],"tags":["cli","e2ee","sync","filesystem"],"backgroundTag":null,"analyzedSha":"2654b33620775080d1d59c552259d41e33dad3d2","analyzedAt":"2026-08-12T14:26:46.263Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}