Skip to content

Invalid or erroring commands do not trigger update check #3291

Open

Description

@janpio

If you run prisma --foo you get output, but in the background no update check is triggered (confirmed that no file in checkpoint-nodejs cache is created). So if the non existence of this command was triggered by an outdated version, it would be super hard to find out as the next command also would not output an update notification.

Invalid commands

C:\Users\Jan\Documents                                                                           
λ prisma --foo                                                                                   
                                                                                                 
! Unknown or unexpected option: --foo                                                            
                                                                                                 
Prisma is a modern DB toolkit to query, migrate and model your database (https://prisma.io)      
                                                                                                 
Usage                                                                                            
                                                                                                 
  $ prisma [command]                                                                             
                                                                                                 
Commands                                                                                         
                                                                                                 
            init   Setup Prisma for your app                                                     
      introspect   Get the datamodel of your database                                            
        generate   Generate artifacts (e.g. Prisma Client)                                       
          format   Formats your schema                                                           
                                                                                                 
Flags                                                                                            
                                                                                                 
  --experimental   Show and run experimental Prisma commands                                     
                                                                                                 
Examples                                                                                         
                                                                                                 
  Setup a new Prisma project                                                                     
  $ prisma init                                                                                  
                                                                                                 
  Introspect an existing database                                                                
  $ prisma introspect                                                                            
                                                                                                 
  Generate artifacts (e.g. Prisma Client)                                                        
  $ prisma generate                                                                              
                                                                                                 
                                                                                                 
C:\Users\Jan\Documents                                                                           
λ prisma generate --foo --bar                                                                    
                                                                                                 
! Unknown or unexpected option: --foo                                                            
                                                                                                 
Generate artifacts (e.g. Prisma Client)                                                          
                                                                                                 
Usage                                                                                            
                                                                                                 
With an existing schema.prisma:                                                                  
  $ prisma generate                                                                              
                                                                                                 
Or specify a schema:                                                                             
  $ prisma generate --schema=./schema.prisma'                                                    
                                                                                                 
Flags                                                                                            
                                                                                                 
  --watch    Watches the Prisma project file                                                     
                                                                                                 

Erroring Commands

λ npx prisma generate
Environment variables loaded from prisma\.env
Error:
You don't have any models defined in your schema.prisma, so nothing will be generated.
You can define a model like this:

model User {
  id    Int     @id @default(autoincrement())
  email String  @unique
  name  String?
}

More information in our documentation:
https://pris.ly/d/prisma-schema

(Running generate on empty schema)

Activity

  1. added
    bug/1-unconfirmed
    kind/bug
    and removed on Aug 14, 2020
  2. changed the title [-]Invalid commands do not trigger update check[/-] [+]Invalid or erroring commands do not trigger update check[/+] on Aug 14, 2020
  3. added
    bug/2-confirmed
    and removed
    bug/1-unconfirmed
    on Aug 14, 2020
  4. pantharshit00 commented on Aug 14, 2020

    @pantharshit00
    Contributor

    I can confirm both of the cases.

    In both cases it didn't create a new file in the cache. Only after I ran a succeeding command it went ahead the created the cache.

  5. removed their assignment
    on Aug 14, 2020
  6. added this to the Backlog 2.6.0 milestone on Aug 19, 2020
  7. added
    tech/typescript
    on Sep 1, 2020
  8. added
    bug/1-unconfirmed
    bug/2-confirmed
    and removed
    bug/2-confirmed
    bug/1-unconfirmed
    on Oct 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/2-confirmedkind/bugstatus/needs-actiontech/typescripttopic: update-notifier

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions