{"record":{"id":"cc5e192b0d91ebcd","repo":"Fission-AI/OpenSpec","slug":"warning-found-start-marker-but-no-end-marker-in","errorCode":null,"errorMessage":"Warning: Found start marker but no end marker in ${profilePath}","messagePattern":"Warning: Found start marker but no end marker in (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/completions/installers/powershell-installer.ts","lineNumber":295,"sourceCode":"          if (err?.code === 'ENOENT') {\n            continue; // Profile doesn't exist, nothing to remove\n          }\n          console.warn(`Warning: Could not read ${profilePath}: ${err?.message ?? String(err)}`);\n          continue;\n        }\n\n        // Remove OPENSPEC:START -> OPENSPEC:END block\n        const startMarker = '# OPENSPEC:START';\n        const endMarker = '# OPENSPEC:END';\n        const startIndex = profileContent.indexOf(startMarker);\n\n        if (startIndex === -1) {\n          continue; // No OpenSpec block found\n        }\n\n        const endIndex = profileContent.indexOf(endMarker, startIndex);\n        if (endIndex === -1) {\n          console.warn(`Warning: Found start marker but no end marker in ${profilePath}`);\n          continue;\n        }\n\n        // Remove the block (including markers and surrounding newlines)\n        const beforeBlock = profileContent.substring(0, startIndex);\n        const afterBlock = profileContent.substring(endIndex + endMarker.length);\n\n        // Clean up extra newlines\n        const newContent = (beforeBlock.trimEnd() + '\\n' + afterBlock.trimStart()).trim() + '\\n';\n\n        if (!(await FileSystemUtils.canWriteFile(profilePath))) {\n          throw new Error(`Path is not writable: ${profilePath}`);\n        }\n        await this.writeProfileFile(profilePath, newContent, fileEncoding, fileBom);\n        anyRemoved = true;\n      } catch (error) {\n        console.warn(`Warning: Could not clean ${profilePath}: ${error}`);\n      }","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/completions/installers/powershell-installer.ts#L277-L313","documentation":"Error \"Warning: Found start marker but no end marker in ${profilePath}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/completions/installers/powershell-installer.ts:295 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}