We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentdc86c0e commitbff96b6Copy full SHA for bff96b6
cli/projectcreate.go
@@ -131,12 +131,13 @@ func doProjectLoop(cmd *cobra.Command, client *codersdk.Client, organization cod
131
iferr!=nil {
132
returnnil,err
133
}
134
+logBuffer:=make([]coderd.ProvisionerJobLog,0,64)
135
for {
-_,ok:=<-logs
136
+log,ok:=<-logs
137
if!ok {
138
break
139
-// _, _ = fmt.Fprintf(cmd.OutOrStdout(), "%s %s\n", color.HiGreenString("[tf]"),log.Output)
140
+logBuffer=append(logBuffer,log)
141
142
143
job,err=client.ProvisionerJob(cmd.Context(),organization.Name,job.ID)
@@ -184,6 +185,10 @@ func doProjectLoop(cmd *cobra.Command, client *codersdk.Client, organization cod
184
185
186
187
ifjob.Status!=coderd.ProvisionerJobStatusSucceeded {
188
+for_,log:=rangelogBuffer {
189
+_,_=fmt.Fprintf(cmd.OutOrStdout(),"%s %s\n",color.HiGreenString("[tf]"),log.Output)
190
+}
191
+
192
returnnil,xerrors.New(job.Error)
193
194