(io *iostreams.IOStreams, total int)
| 1111 | const installProgressLabel = "Downloading skill files" |
| 1112 | |
| 1113 | func installProgress(io *iostreams.IOStreams, total int) func(done, total int) { |
| 1114 | if total <= 0 { |
| 1115 | return nil |
| 1116 | } |
| 1117 | return func(done, total int) { |
| 1118 | if done == 0 { |
| 1119 | io.StartProgressIndicatorWithLabel(installProgressLabel) |
| 1120 | } else if done >= total { |
| 1121 | io.StopProgressIndicator() |
| 1122 | } |
| 1123 | } |
| 1124 | } |
| 1125 | |
| 1126 | func friendlyDir(dir string) string { |
| 1127 | if cwd, err := os.Getwd(); err == nil { |