mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-14 14:48:49 +00:00
Run terraform init to initialize terraform modules
This commit is contained in:
parent
59dc6cbf90
commit
9589dabdd4
@ -286,6 +286,7 @@ following rules are enabled by default:
|
||||
* `sudo_command_from_user_path` – runs commands from users `$PATH` with `sudo`;
|
||||
* `switch_lang` – switches command from your local layout to en;
|
||||
* `systemctl` – correctly orders parameters of confusing `systemctl`;
|
||||
* `terraform_init.py` – run `terraform init` before plan or apply;
|
||||
* `test.py` – runs `py.test` instead of `test.py`;
|
||||
* `touch` – creates missing directories before "touching";
|
||||
* `tsuru_login` – runs `tsuru login` if not authenticated or session expired;
|
||||
|
13
thefuck/rules/terraform_init.py
Normal file
13
thefuck/rules/terraform_init.py
Normal file
@ -0,0 +1,13 @@
|
||||
from thefuck.shells import shell
|
||||
from thefuck.utils import for_app
|
||||
|
||||
|
||||
@for_app('terraform')
|
||||
def match(command):
|
||||
return ('this module is not yet installed' in command.output.lower() or
|
||||
'initialization required' in command.output.lower()
|
||||
)
|
||||
|
||||
|
||||
def get_new_command(command):
|
||||
return shell.and_('terraform init', command.script)
|
Loading…
x
Reference in New Issue
Block a user