소스 검색

fix hubtest --no-clean when failure (#1088)

AlteredCoder 3 년 전
부모
커밋
4c306187a6
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      cmd/crowdsec-cli/hubtest.go

+ 2 - 2
cmd/crowdsec-cli/hubtest.go

@@ -120,7 +120,7 @@ cscli hubtest create my-scenario-test --parsers crowdsecurity/nginx --scenarios
 				LogFile:       logFileName,
 				LogType:       logType,
 				IgnoreParsers: ignoreParsers,
-				Labels: 	   labels,
+				Labels:        labels,
 			}
 
 			configFilePath := filepath.Join(testPath, "config.yaml")
@@ -255,7 +255,7 @@ cscli hubtest create my-scenario-test --parsers crowdsecurity/nginx --scenarios
 								fmt.Println()
 							}
 						}
-						if !forceClean {
+						if !forceClean && !noClean {
 							prompt := &survey.Confirm{
 								Message: fmt.Sprintf("\nDo you want to remove runtime folder for test '%s'? (default: Yes)", test.Name),
 								Default: true,