Skip to content

Commit

Permalink
feat: plugconf/config-func: also call 'volt build'
Browse files Browse the repository at this point in the history
  • Loading branch information
tyru committed Mar 31, 2018
1 parent 3589893 commit ae5a003
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cmd/migrate/plugconf-config-func.go
Expand Up @@ -7,10 +7,12 @@ import (
"path/filepath"
"strings"

"github.com/vim-volt/volt/cmd/builder"
"github.com/vim-volt/volt/lockjson"
"github.com/vim-volt/volt/logger"
"github.com/vim-volt/volt/pathutil"
"github.com/vim-volt/volt/plugconf"
"github.com/vim-volt/volt/transaction"
)

func init() {
Expand Down Expand Up @@ -76,5 +78,19 @@ func (*plugconfConfigMigrater) Migrate() error {
return err
}
}

// Begin transaction
err = transaction.Create()
if err != nil {
return err
}
defer transaction.Remove()

// Build ~/.vim/pack/volt dir
err = builder.Build(false)
if err != nil {
return errors.New("could not build " + pathutil.VimVoltDir() + ": " + err.Error())
}

return nil
}

0 comments on commit ae5a003

Please sign in to comment.