Compare commits

...
Author SHA1 Message Date
Tabish Bidiwale 0cd8775de2 fix: normalize paths for cross-platform consistency in logging
- Use POSIX-style forward slashes in FILE_PATHS for consistent logging
- Normalize backslashes to forward slashes in update command output
- Improves Windows compatibility and log readability
2025-10-09 17:11:40 +11:00
2 changed files with 7 additions and 6 deletions
+4 -3
View File
@@ -5,10 +5,11 @@ import { SlashCommandId, TemplateManager } from "../../templates/index.js";
import { FileSystemUtils } from "../../../utils/file-system.js";
import { OPENSPEC_MARKERS } from "../../config.js";
// Use POSIX-style paths for consistent logging across platforms.
const FILE_PATHS: Record<SlashCommandId, string> = {
proposal: path.join(".codex", "prompts", "openspec-proposal.md"),
apply: path.join(".codex", "prompts", "openspec-apply.md"),
archive: path.join(".codex", "prompts", "openspec-archive.md"),
proposal: ".codex/prompts/openspec-proposal.md",
apply: ".codex/prompts/openspec-apply.md",
archive: ".codex/prompts/openspec-archive.md",
};
export class CodexSlashCommandConfigurator extends SlashCommandConfigurator {
+3 -3
View File
@@ -106,9 +106,9 @@ export class UpdateCommand {
}
if (updatedSlashFiles.length > 0) {
summaryParts.push(
`Updated slash commands: ${updatedSlashFiles.join(', ')}`
);
// Normalize to forward slashes for cross-platform log consistency
const normalized = updatedSlashFiles.map((p) => p.replace(/\\/g, '/'));
summaryParts.push(`Updated slash commands: ${normalized.join(', ')}`);
}
const failedItems = [