mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-07-27 16:49:51 -07:00
feat(sync-ui): sync window renderer, snapshots in /tmp/subminer-db-snapshots, docs + changelog
This commit is contained in:
@@ -74,10 +74,7 @@ test('parseCliPrograms captures sync --json and --check flags', () => {
|
||||
});
|
||||
|
||||
test('parseCliPrograms rejects invalid sync --check combinations', () => {
|
||||
assert.throws(
|
||||
() => parseCliPrograms(['sync', '--check'], 'subminer'),
|
||||
/--check requires a host/,
|
||||
);
|
||||
assert.throws(() => parseCliPrograms(['sync', '--check'], 'subminer'), /--check requires a host/);
|
||||
assert.throws(
|
||||
() => parseCliPrograms(['sync', 'media-box', '--check', '--push'], 'subminer'),
|
||||
/--check cannot be combined/,
|
||||
|
||||
@@ -356,7 +356,9 @@ export function parseCliPrograms(
|
||||
throw new Error('Sync --check requires a host.');
|
||||
}
|
||||
if (check && (push || pull || snapshot || merge)) {
|
||||
throw new Error('Sync --check cannot be combined with --push, --pull, --snapshot, or --merge.');
|
||||
throw new Error(
|
||||
'Sync --check cannot be combined with --push, --pull, --snapshot, or --merge.',
|
||||
);
|
||||
}
|
||||
const modes = [Boolean(host), Boolean(snapshot), Boolean(merge)].filter(Boolean).length;
|
||||
if (modes === 0) {
|
||||
|
||||
Reference in New Issue
Block a user