Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

fix: progress bar doesn't show any progress #166

Merged
merged 1 commit into from
Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/cli/internal/pkg/aws/cdk/execute_cdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

var ExecuteCdkCommand = executeCdkCommand
var execCommand = exec.Command
var progressRegex = regexp.MustCompile(`^\s*([0-9]+/[0-9]+)\s*\|(.*)`)
var progressRegex = regexp.MustCompile(`^.*\|\s*([0-9]+/[0-9]+)\s*\|(.*)`)

var osRemoveAll = os.RemoveAll

Expand Down Expand Up @@ -44,7 +44,6 @@ func executeCdkCommandAndCleanupDirectory(appDir string, commandArgs []string, t
if err != nil {
progressChan <- ProgressEvent{Err: err}
}

}()
return progressChan, nil
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/internal/pkg/aws/cdk/execute_cdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
const (
testExecuteCommandSuccessArg = "test-execute-command-success-arg"
testExecuteCommandFailureArg = "test-execute-command-failure-arg"
testExecuteCommandProgressLine = " 3/10 |4:56:17 PM | CREATE_COMPLETE | AWS::IAM::Policy | TaskBatch/BatchRole/DefaultPolicy (TaskBatchBatchRoleDefaultPolicyB9AAE3A1)"
testExecuteCommandProgressLine = "Agc-Context-Demo-yy110HKO4J-ctx1 | 3/10 | 3:22:16 PM | REVIEW_IN_PROGRESS | AWS::CloudFormation::Stack | Agc-Context-Demo-yy110HKO4J-ctx1 User Initiated"
)

func fakeExecCommand(command string, args ...string) *exec.Cmd {
Expand Down