mirror of
https://github.com/cline/cline.git
synced 2025-06-03 03:59:07 +00:00
Create .clinerules directory when adding new cline rule in ui and .clinerules is currently a file (#3217)
* create clinerules dir * change default * changeset * md
This commit is contained in:
parent
03d44105cc
commit
77c9863b50
5
.changeset/blue-lobsters-sort.md
Normal file
5
.changeset/blue-lobsters-sort.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": minor
|
||||
---
|
||||
|
||||
create clinerules folder if its currently a file and creating new rule
|
@ -221,7 +221,14 @@ export const createRuleFile = async (isGlobal: boolean, filename: string, cwd: s
|
||||
filePath = path.join(globalClineRulesFilePath, filename)
|
||||
} else {
|
||||
const localClineRulesFilePath = path.resolve(cwd, GlobalFileNames.clineRules)
|
||||
|
||||
const hasError = await ensureLocalClinerulesDirExists(cwd)
|
||||
if (hasError === true) {
|
||||
return { filePath: null, fileExists: false }
|
||||
}
|
||||
|
||||
await fs.mkdir(localClineRulesFilePath, { recursive: true })
|
||||
|
||||
filePath = path.join(localClineRulesFilePath, filename)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user