Skip to content

Commit

Permalink
fix: dont write settings if skipWrites
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Sep 18, 2024
1 parent 7740f25 commit dec80b5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/core/src/settings/settingsManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ export async function createSettingsManager(mq: MoquerieInstance) {

notifySettingsChange(currentSettings)

try {
await fs.promises.writeFile(file, JSON.stringify(currentSettings, null, 2))
}
catch (e) {
console.error(e)
if (!mq.data.skipWrites) {
try {
await fs.promises.writeFile(file, JSON.stringify(currentSettings, null, 2))
}
catch (e) {
console.error(e)
}
}
}

Expand Down

0 comments on commit dec80b5

Please sign in to comment.