Merge pull request #594 from sstarcher/fetch_devel
fix: Fetch devel Fixes two issues encountered in https://sweetops.slack.com/archives/CE5NGCB9Q/p1557848927155400
This commit is contained in:
		
						commit
						9eec72b318
					
				| 
						 | 
					@ -340,6 +340,9 @@ func (e *Error) Error() string {
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		msgs := []string{}
 | 
							msgs := []string{}
 | 
				
			||||||
		for i, err := range e.Errors {
 | 
							for i, err := range e.Errors {
 | 
				
			||||||
 | 
								if err == nil {
 | 
				
			||||||
 | 
									continue
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			msgs = append(msgs, fmt.Sprintf("err %d: %v", i, err.Error()))
 | 
								msgs = append(msgs, fmt.Sprintf("err %d: %v", i, err.Error()))
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		cause = fmt.Sprintf("%d errors:\n%s", len(e.Errors), strings.Join(msgs, "\n"))
 | 
							cause = fmt.Sprintf("%d errors:\n%s", len(e.Errors), strings.Join(msgs, "\n"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -450,6 +450,10 @@ func (st *HelmState) downloadCharts(helm helmexec.Interface, dir string, concurr
 | 
				
			||||||
						chartPath = path.Join(dir, release.Name, "latest", release.Chart)
 | 
											chartPath = path.Join(dir, release.Name, "latest", release.Chart)
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
										if st.isDevelopment(release) {
 | 
				
			||||||
 | 
											fetchFlags = append(fetchFlags, "--devel")
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					// only fetch chart if it is not already fetched
 | 
										// only fetch chart if it is not already fetched
 | 
				
			||||||
					if _, err := os.Stat(chartPath); os.IsNotExist(err) {
 | 
										if _, err := os.Stat(chartPath); os.IsNotExist(err) {
 | 
				
			||||||
						fetchFlags = append(fetchFlags, "--untar", "--untardir", chartPath)
 | 
											fetchFlags = append(fetchFlags, "--untar", "--untardir", chartPath)
 | 
				
			||||||
| 
						 | 
					@ -463,7 +467,6 @@ func (st *HelmState) downloadCharts(helm helmexec.Interface, dir string, concurr
 | 
				
			||||||
						chartPath = filepath.Dir(fullChartPath)
 | 
											chartPath = filepath.Dir(fullChartPath)
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					 | 
				
			||||||
				results <- &downloadResults{release.Name, chartPath}
 | 
									results <- &downloadResults{release.Name, chartPath}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue