From 677aa6750cdab243bb096cddf2fa13f4bbac82ea Mon Sep 17 00:00:00 2001 From: Martyn Loughran Date: Mon, 12 Dec 2022 20:24:51 +0000 Subject: [PATCH] Update terraform example to remove wrapper --- Home.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Home.md b/Home.md index 0cd7043..0cfdee7 100644 --- a/Home.md +++ b/Home.md @@ -147,18 +147,10 @@ Note that Prettier also supports some other languages through the use of plugins ``` [formatter.terraform] -# Terraform fmt only takes one file at the time so we create a wrapper. -# See https://github.com/numtide/treefmt/issues/97 -command = "/bin/sh" -options = [ - "-euc", - """ -for f in "$@"; do - terraform fmt "$f" -done - """, - "--", -] +# Careful, only terraform 1.3.0 or later accept a list of files. +# see https://github.com/numtide/treefmt/issues/97 +command = "terraform" +options = ["fmt"] includes = ["*.tf"] ```