You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-10 22:11:50 +02:00
Cli: Refresh shares when running the sync command (#12667)
This commit is contained in:
@@ -17,6 +17,7 @@ import { pathExists, writeFile } from 'fs-extra';
|
||||
import { checkIfLoginWasSuccessful, generateApplicationConfirmUrl } from '@joplin/lib/services/joplinCloudUtils';
|
||||
import Logger from '@joplin/utils/Logger';
|
||||
import { uuidgen } from '@joplin/lib/uuid';
|
||||
import ShareService from '@joplin/lib/services/share/ShareService';
|
||||
|
||||
const logger = Logger.create('command-sync');
|
||||
|
||||
@@ -230,6 +231,10 @@ class Command extends BaseCommand {
|
||||
return cleanUp();
|
||||
}
|
||||
|
||||
// Refresh share invitations -- if running without a GUI, some of the
|
||||
// maintenance tasks may otherwise be skipped.
|
||||
await ShareService.instance().maintenance();
|
||||
|
||||
this.stdout(_('Starting synchronisation...'));
|
||||
|
||||
const contextKey = `sync.${this.syncTargetId_}.context`;
|
||||
|
Reference in New Issue
Block a user