Skip to content

Commit ac9f122

Browse files
committed
Ignored config.json when updating
1 parent 83a8cba commit ac9f122

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/menus/update.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ export default async (beforeError, forceUpdate) => {
160160
// Simulates a loading time
161161
await new Promise(resolve => setTimeout(resolve, 3000)); // Espera de 3 segundos
162162

163+
// Ignores the config.json file
164+
await git.raw(['update-index', '--skip-worktree', 'config.json']);
165+
163166
// Makes a pull to update the bot
164167
//await git.pull();
165168

migrations/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ export default {
1717
};
1818
```
1919

20-
> These scripts will not be executed when loading the database connection if `process.env.NODE_ENV != "production"`, so to use them in other environments, it is necessary to invoke them through CLI commands or do so with additional instructions to execute the `client.functions.db.migrate` method.
20+
> These scripts will not be executed when loading the database connection if `process.env.NODE_ENV != "production"`, so to use them in other environments, it is necessary to invoke them through CLI commands or do so with additional instructions to execute the `client.functions.db.migrate` method.
21+
22+
> This script can also be used to migrate files such as `config.json`, which is not overwritten during an automatic update (so should be checked if it adapts to new versions).

0 commit comments

Comments
 (0)