This repository was archived by the owner on May 6, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ function terraformFmt {
99
1010 # Gather the output of `terraform fmt`.
1111 echo " fmt: info: checking if Terraform files in ${tfWorkingDir} are correctly formatted"
12- fmtOutput=$( terraform fmt -check -write=false -diff ${fmtRecursive} 2>&1 )
12+ fmtOutput=$( terraform fmt -check=true -write=false -diff ${fmtRecursive} 2>&1 )
1313 fmtExitCode=${?}
1414
1515 # Exit code of 0 indicates success. Print the output and exit.
@@ -33,15 +33,15 @@ function terraformFmt {
3333 echo " ${fmtOutput} "
3434 echo
3535 echo " fmt: error: the following files in ${tfWorkingDir} are incorrectly formatted"
36- fmtFileList=$( terraform fmt -check -write=false -list -recursive 2>&1 )
36+ fmtFileList=$( terraform fmt -check=true -write=false -list ${fmtRecursive} )
3737 echo " ${fmtFileList} "
3838 echo
3939
4040 # Comment on the pull request if necessary.
4141 if [ " $GITHUB_EVENT_NAME " == " pull_request" ] && [ " ${tfComment} " == " 1" ]; then
4242 fmtComment=" "
4343 for file in ${fmtFileList} ; do
44- fmtFileDiff=$( terraform fmt -check -write=false -diff " $file " | sed -n ' /@@.*/,//{/@@.*/d;p}' )
44+ fmtFileDiff=$( terraform fmt -check=true -write=false -diff " ${ file} " | sed -n ' /@@.*/,//{/@@.*/d;p}' )
4545 fmtComment=" ${fmtComment}
4646<details><summary><code>${tfWorkingDir} /${file} </code></summary>
4747
You can’t perform that action at this time.
0 commit comments