fix: option to allow cluster migrations without relying on self hosting env

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-10-23 10:49:45 +02:00
parent 411021ee04
commit bcfb4f25fb
3 changed files with 19 additions and 9 deletions

View File

@@ -16,11 +16,11 @@ export function printBoxMessage(title: string, lines: (string | unknown)[]) {
export function getIsCluster() {
const args = process.argv;
const noClusterArg = args.includes('--no-cluster');
if (noClusterArg) {
return false;
}
return !getIsSelfHosting();
return (
args.includes('--cluster') ||
process.env.CLICKHOUSE_CLUSTER === 'true' ||
process.env.CLICKHOUSE_CLUSTER === '1'
);
}
export function getIsSelfHosting() {