diff --git a/internal/engine/environments/azure.go b/internal/engine/environments/azure.go index b964bec..15a50f1 100644 --- a/internal/engine/environments/azure.go +++ b/internal/engine/environments/azure.go @@ -28,6 +28,7 @@ type AzureDeploymentStatus struct { Status string `json:"status"` ResourceURIs []string `json:"resourceURIs"` Error string `json:"error"` + Output string `json:"output"` } func NewAzureDeploymentStatus() AzureDeploymentStatus { @@ -67,6 +68,10 @@ func (status *AzureDeploymentStatus) SetError(err error) { status.Error = err.Error() } +func (status *AzureDeploymentStatus) SetOutput(output string) { + status.Output = output +} + // Print out the status JSON for azure/cloudshell if in the correct environment. func ReportAzureStatus(status AzureDeploymentStatus, environment string) { if !IsAzureEnvironment(environment) { @@ -109,7 +114,6 @@ func AttachResourceURIsToAzureStatus( resourceGroupName string, environment string, ) { - if !IsAzureEnvironment(environment) { logging.GlobalLogger.Info( "Not fetching resource URIs because we're not in the OCD environment.", diff --git a/internal/engine/interactive/interactive.go b/internal/engine/interactive/interactive.go index 2be7335..a766957 100644 --- a/internal/engine/interactive/interactive.go +++ b/internal/engine/interactive/interactive.go @@ -283,6 +283,7 @@ func (model InteractiveModeModel) Update(message tea.Msg) (tea.Model, tea.Cmd) { model.resourceGroupName, model.environment, ) + model.azureStatus.SetOutput(strings.Join(model.CommandLines, "\n")) commands = append( commands, tea.Sequence( @@ -315,6 +316,8 @@ func (model InteractiveModeModel) Update(message tea.Msg) (tea.Model, tea.Cmd) { model.resourceGroupName, model.environment, ) + + model.azureStatus.SetOutput(strings.Join(model.CommandLines, "\n")) commands = append( commands, tea.Sequence(