Skip to content

Commit 0b6480b

Browse files
committed
fixup
1 parent 42e9028 commit 0b6480b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/dotfiles.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ func dotfiles() *cobra.Command {
9494
}
9595
_, _ = fmt.Fprintln(cmd.OutOrStdout(), string(out))
9696

97-
// check for install scripts
9897
files, err := os.ReadDir(dotfilesDir)
9998
if err != nil {
10099
return xerrors.Errorf("reading files in dir %s: %w", dotfilesDir, err)
@@ -154,7 +153,6 @@ func dotfiles() *cobra.Command {
154153
return nil
155154
}
156155

157-
// run found install scripts
158156
_, err = cliui.Prompt(cmd, cliui.PromptOptions{
159157
Text: fmt.Sprintf("Running install script %s.\n\n Continue?", script),
160158
IsConfirm: true,
@@ -186,6 +184,7 @@ func dotfiles() *cobra.Command {
186184
return cmd
187185
}
188186

187+
// dirExists checks if the dir already exists.
189188
func dirExists(name string) (bool, error) {
190189
_, err := os.Stat(name)
191190
if err != nil {
@@ -199,8 +198,9 @@ func dirExists(name string) (bool, error) {
199198
return true, nil
200199
}
201200

202-
func findScript(installScriptSet []string, files []fs.DirEntry) string {
203-
for _, i := range installScriptSet {
201+
// findScript will find the first file that matches the script set.
202+
func findScript(scriptSet []string, files []fs.DirEntry) string {
203+
for _, i := range scriptSet {
204204
for _, f := range files {
205205
if f.Name() == i {
206206
return f.Name()

0 commit comments

Comments
 (0)