• Martin Atkins's avatar
    main: new global option -chdir · efe78b29
    Martin Atkins authored
    This new option is intended to address the previous inconsistencies where
    some older subcommands supported partially changing the target directory
    (where Terraform would use the new directory inconsistently) where newer
    commands did not support that override at all.
    
    Instead, now Terraform will accept a -chdir command at the start of the
    command line (before the subcommand) and will interpret it as a request
    to direct all actions that would normally be taken in the current working
    directory into the target directory instead. This is similar to options
    offered by some other similar tools, such as the -C option in "make".
    
    The new option is only accepted at the start of the command line (before
    the subcommand) as a way to reflect that it is a global command (not
    specific to a particular subcommand) and that it takes effect _before_
    executing the subcommand. This also means it'll be forced to appear before
    any other command-specific arguments that take file paths, which hopeful...
    efe78b29