Skip to content

Commit

Permalink
fix(terraform): error when no variables are specified in provider config
Browse files Browse the repository at this point in the history
  • Loading branch information
edvald committed Oct 30, 2019
1 parent 7af3ceb commit 6251d90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions garden-service/src/plugins/terraform/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ export async function applyStack(log: LogEntry, provider: TerraformProvider, roo
* If any variables are specified in the Garden config, this prepares a .tfvars file to use and returns the
* appropriate arguments to pass to the Terraform CLI, otherwise an empty array.
*/
export async function prepareVariables(targetDir: string, variables: object): Promise<string[]> {
if (Object.entries(variables).length === 0) {
export async function prepareVariables(targetDir: string, variables?: object): Promise<string[]> {
if (Object.entries(variables || {}).length === 0) {
return []
}

Expand Down

0 comments on commit 6251d90

Please sign in to comment.