Merge pull request #2336 from R3D347HR4Y/excludelogsfrombackups

FIX - Deletes the shared-logs from the copied /captain/data folder upon a backup of the config
This commit is contained in:
Kasra Bigdeli
2025-09-09 22:02:06 -07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -6,7 +6,7 @@
"**/built": true, "**/built": true,
"**/coverge": true "**/coverge": true
}, },
"editor.formatOnSave": true, "editor.formatOnSave": false,
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.organizeImports": "explicit", "source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit", "source.fixAll.eslint": "explicit",
@@ -19,7 +19,7 @@
"editor.defaultFormatter": "foxundermoon.shell-format" "editor.defaultFormatter": "foxundermoon.shell-format"
}, },
"[plaintext]": { "[plaintext]": {
"editor.formatOnSave": false, "editor.formatOnSave": true,
"editor.defaultFormatter": null "editor.defaultFormatter": null
}, },
"files.associations": { "files.associations": {

View File

@@ -658,7 +658,7 @@ export default class BackupManager {
// https://github.com/jprichardson/node-fs-extra/issues/638 // https://github.com/jprichardson/node-fs-extra/issues/638
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
const child = exec( const child = exec(
`mkdir -p {dest} && cp -rp ${CaptainConstants.captainDataDirectory} ${dest}` `mkdir -p ${dest} && cp -rp ${CaptainConstants.captainDataDirectory} ${dest} && mkdir -p ${dest}/shared-logs && rm -rf ${dest}/shared-logs`
) )
child.addListener('error', reject) child.addListener('error', reject)
child.addListener('exit', resolve) child.addListener('exit', resolve)