diff --git a/binaries/binaries.go b/binaries/binaries.go index 507bb5eb..4090a5e5 100644 --- a/binaries/binaries.go +++ b/binaries/binaries.go @@ -16,11 +16,11 @@ import ( ) // PrismaVersion is a hardcoded version of the Prisma CLI. -const PrismaVersion = "2.0.0-alpha.1253" +const PrismaVersion = "2.0.0-alpha.1265" // EngineVersion is a hardcoded version of the Prisma Engine. // The versions can be found under https://github.com/prisma/prisma-engine/commits/master. -const EngineVersion = "c48b94aa8d1d9a0e5582dcd14e25202b76303dca" +const EngineVersion = "4dbefe724ae6df3621eb660a5d0e0402e34189bf" // PrismaURL points to an S3 bucket URL where the CLI binaries are stored. var PrismaURL = "https://prisma-photongo.s3-eu-west-1.amazonaws.com/%s-%s-%s.gz" diff --git a/main.go b/main.go index ff1e19ba..cce2d295 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,15 @@ func main() { logger.Debug.Printf("invoking prisma") + // if this wasn't actually invoked by the prisma generator, print a warning and exit + if os.Getenv("PRISMA_GENERATOR_INVOCATION") == "" { + logger.Info.Printf("This command is only meant to be invoked internally. Please run the following instead:") + logger.Info.Printf("`go run github.com/prisma/prisma-client-go `") + logger.Info.Printf("e.g.") + logger.Info.Printf("`go run github.com/prisma/prisma-client-go generate`") + os.Exit(1) + } + // exit when signal triggers c := make(chan os.Signal) signal.Notify(c, os.Interrupt, syscall.SIGTERM)