@@ -19,7 +19,7 @@ function validateIdentifier(value: string, fieldName: string): void {
1919
2020/**
2121 * Escapes a string for safe use as a shell argument.
22- *
22+ *
2323 * This function wraps the input value in single quotes and escapes any embedded single quotes
2424 * using the POSIX shell pattern: '\''. This is the standard technique for safely passing
2525 * arbitrary strings as arguments to POSIX-compliant shells.
@@ -36,7 +36,9 @@ export async function getResources(
3636) : Promise < TerraformResource [ ] > {
3737 const commandResult = await useTempFile ( template , async ( filePath ) => {
3838 return await executeHclEditCommand (
39- `-f ${ escapeShellArgument ( filePath ) } block get resource | hcledit block list` ,
39+ `-f ${ escapeShellArgument (
40+ filePath ,
41+ ) } block get resource | hcledit block list`,
4042 ) ;
4143 } ) ;
4244
@@ -96,7 +98,10 @@ export async function updateResourceProperties(
9698 validateIdentifier ( resourceName , 'Resource name' ) ;
9799
98100 modifications . forEach ( ( modification , index ) => {
99- validateIdentifier ( modification . propertyName , `Property name at index ${ index } ` ) ;
101+ validateIdentifier (
102+ modification . propertyName ,
103+ `Property name at index ${ index } ` ,
104+ ) ;
100105 } ) ;
101106
102107 const providedTemplate = template . trim ( ) as string ;
@@ -165,7 +170,9 @@ export async function deleteResource(
165170
166171 const commandResult = await useTempFile ( template , async ( filePath ) => {
167172 return await executeHclEditCommand (
168- `-f ${ escapeShellArgument ( filePath ) } block rm resource.${ resourceType } .${ resourceName } ` ,
173+ `-f ${ escapeShellArgument (
174+ filePath ,
175+ ) } block rm resource.${ resourceType } .${ resourceName } `,
169176 ) ;
170177 } ) ;
171178
@@ -199,7 +206,9 @@ async function getAttributeCommand(
199206 resourceName : string ,
200207 propertyName : string ,
201208) : Promise < string > {
202- const command = `-f ${ escapeShellArgument ( filePath ) } attribute get resource.${ resourceType } .${ resourceName } .${ propertyName } ` ;
209+ const command = `-f ${ escapeShellArgument (
210+ filePath ,
211+ ) } attribute get resource.${ resourceType } .${ resourceName } .${ propertyName } `;
203212
204213 const commandResult = await executeHclEditCommand ( command ) ;
205214
@@ -218,7 +227,9 @@ async function updateTemplateCommand(
218227 filePath : string ,
219228 modifications : string [ ] ,
220229) : Promise < string > {
221- const command = `-f ${ escapeShellArgument ( filePath ) } ${ modifications . join ( ' | hcledit ' ) } ` ;
230+ const command = `-f ${ escapeShellArgument ( filePath ) } ${ modifications . join (
231+ ' | hcledit ' ,
232+ ) } `;
222233
223234 const commandResult = await executeHclEditCommand ( command ) ;
224235
0 commit comments