Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Pulak Kanti Bhowmick <pkbhowmick007@gmail.com>
  • Loading branch information
pkbhowmick committed Nov 16, 2024
1 parent 453fb17 commit 8d06b14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/exec/shell_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ func execTerraformShellCommand(
componentEnvList = append(componentEnvList, fmt.Sprintf("TF_CLI_ARGS_import=-var-file=%s", varFile))
componentEnvList = append(componentEnvList, fmt.Sprintf("TF_CLI_ARGS_destroy=-var-file=%s", varFile))
componentEnvList = append(componentEnvList, fmt.Sprintf("TF_CLI_ARGS_console=-var-file=%s", varFile))
if cliConfig.Components.Terraform.Shell.Prompt != "" {
componentEnvList = append(componentEnvList, cliConfig.Components.Terraform.Shell.Prompt)

hasCustomShellPrompt := cliConfig.Components.Terraform.Shell.Prompt != ""
if hasCustomShellPrompt {
componentEnvList = append(componentEnvList, fmt.Sprintf("PS1=%s", cliConfig.Components.Terraform.Shell.Prompt))
}

u.LogDebug(cliConfig, "\nStarting a new interactive shell where you can execute all native Terraform commands (type 'exit' to go back)")
Expand Down

0 comments on commit 8d06b14

Please sign in to comment.