• Martin Atkins's avatar
    main: Special error message for invalid top-level command · 28d2cb55
    Martin Atkins authored
    Previously Terraform would react to an invalid top-level command the same
    way as for typing no command at all: just printing out the long top-level
    help directory.
    
    If someone's tried to type a command, it's more helpful to respond to that
    request by explaining directly that the command is invalid, rather than
    leaving the user to puzzle that out themselves by referring to the help
    text.
    
    As a bonus, this also allows us to use our "didyoumean" package to suggest
    possible alternatives if it seems like the user made a typo.
    28d2cb55