Skip to content

Commit 4cc0326

Browse files
authored
chore: issue a warning if "generateClient" is set to false in the prisma plugin (#1555)
1 parent 4bda34e commit 4cc0326

File tree

1 file changed

+7
-0
lines changed
  • packages/schema/src/plugins/prisma

1 file changed

+7
-0
lines changed

packages/schema/src/plugins/prisma/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import telemetry from '../../telemetry';
88
import { execPackage } from '../../utils/exec-utils';
99
import { findUp } from '../../utils/pkg-utils';
1010
import { PrismaSchemaGenerator } from './schema-generator';
11+
import colors from 'colors';
1112

1213
export const name = 'Prisma';
1314
export const description = 'Generating Prisma schema';
@@ -60,6 +61,12 @@ const run: PluginFunction = async (model, options, _dmmf, _globalOptions) => {
6061
prismaClientPath = path.relative(path.dirname(options.schemaPath), absPath);
6162
}
6263
}
64+
} else {
65+
console.warn(
66+
colors.yellow(
67+
'Skipping prisma client generation because "generateClient" is set to false. This may break plugins that depend on the prisma client.'
68+
)
69+
);
6370
}
6471

6572
// load the result DMMF

0 commit comments

Comments
 (0)