mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Fix typo in mdm.json (#4767)
* Fix typo in mdm.json * Update src/services/mdm/MdmService.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
parent
8dd99a0254
commit
c10fbbc3a7
2 changed files with 11 additions and 11 deletions
|
|
@ -146,22 +146,22 @@ export class MdmService {
|
|||
private getMdmConfigPath(): string {
|
||||
const platform = os.platform()
|
||||
const isProduction = process.env.NODE_ENV === "production"
|
||||
const configFileName = isProduction ? "mcp.json" : "mcp.dev.json"
|
||||
const configFileName = isProduction ? "mdm.json" : "mdm.dev.json"
|
||||
|
||||
switch (platform) {
|
||||
case "win32": {
|
||||
// Windows: %ProgramData%\RooCode\mcp.json or mcp.dev.json
|
||||
// Windows: %ProgramData%\RooCode\mdm.json or mdm.dev.json
|
||||
const programData = process.env.PROGRAMDATA || "C:\\ProgramData"
|
||||
return path.join(programData, "RooCode", configFileName)
|
||||
}
|
||||
|
||||
case "darwin":
|
||||
// macOS: /Library/Application Support/RooCode/mcp.json or mcp.dev.json
|
||||
// macOS: /Library/Application Support/RooCode/mdm.json or mdm.dev.json
|
||||
return `/Library/Application Support/RooCode/${configFileName}`
|
||||
|
||||
case "linux":
|
||||
default:
|
||||
// Linux: /etc/roo-code/mcp.json or mcp.dev.json
|
||||
// Linux: /etc/roo-code/mdm.json or mdm.dev.json
|
||||
return `/etc/roo-code/${configFileName}`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ describe("MdmService", () => {
|
|||
|
||||
await MdmService.createInstance()
|
||||
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith(path.join("C:\\ProgramData", "RooCode", "mcp.json"))
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith(path.join("C:\\ProgramData", "RooCode", "mdm.json"))
|
||||
})
|
||||
|
||||
it("should use correct path for Windows in development", async () => {
|
||||
|
|
@ -160,7 +160,7 @@ describe("MdmService", () => {
|
|||
|
||||
await MdmService.createInstance()
|
||||
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith(path.join("C:\\ProgramData", "RooCode", "mcp.dev.json"))
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith(path.join("C:\\ProgramData", "RooCode", "mdm.dev.json"))
|
||||
})
|
||||
|
||||
it("should use correct path for macOS in production", async () => {
|
||||
|
|
@ -171,7 +171,7 @@ describe("MdmService", () => {
|
|||
|
||||
await MdmService.createInstance()
|
||||
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/Library/Application Support/RooCode/mcp.json")
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/Library/Application Support/RooCode/mdm.json")
|
||||
})
|
||||
|
||||
it("should use correct path for macOS in development", async () => {
|
||||
|
|
@ -182,7 +182,7 @@ describe("MdmService", () => {
|
|||
|
||||
await MdmService.createInstance()
|
||||
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/Library/Application Support/RooCode/mcp.dev.json")
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/Library/Application Support/RooCode/mdm.dev.json")
|
||||
})
|
||||
|
||||
it("should use correct path for Linux in production", async () => {
|
||||
|
|
@ -193,7 +193,7 @@ describe("MdmService", () => {
|
|||
|
||||
await MdmService.createInstance()
|
||||
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/etc/roo-code/mcp.json")
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/etc/roo-code/mdm.json")
|
||||
})
|
||||
|
||||
it("should use correct path for Linux in development", async () => {
|
||||
|
|
@ -204,7 +204,7 @@ describe("MdmService", () => {
|
|||
|
||||
await MdmService.createInstance()
|
||||
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/etc/roo-code/mcp.dev.json")
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/etc/roo-code/mdm.dev.json")
|
||||
})
|
||||
|
||||
it("should default to dev config when NODE_ENV is not set", async () => {
|
||||
|
|
@ -215,7 +215,7 @@ describe("MdmService", () => {
|
|||
|
||||
await MdmService.createInstance()
|
||||
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/Library/Application Support/RooCode/mcp.dev.json")
|
||||
expect(mockFs.existsSync).toHaveBeenCalledWith("/Library/Application Support/RooCode/mdm.dev.json")
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue