Skip to content

Commit

Permalink
improving coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Phillip Miller committed Dec 29, 2021
1 parent 92dc795 commit aba69d4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
5 changes: 4 additions & 1 deletion extra/extra.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ func InstallExtraPackages(osType string, dirs *localio.Directories, packages *lo
return err
}
fmt.Println("[+] Installing git-delta latest release")
if err = localio.RunCommandPipeOutput(fmt.Sprintf("sudo dpkg --no-pager -i %s", debPackage)); err != nil {
if err = localio.RunCommandPipeOutput(fmt.Sprintf("sudo dpkg --no-pager --force-depends -i %s", debPackage)); err != nil {
return err
}
if err = localio.RunCommandPipeOutput("sudo apt-get -y -q install -f"); err != nil {
return err
}
}
Expand Down
16 changes: 6 additions & 10 deletions vim/vim.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ var myConfigs embed.FS

// InstallVimPlugins ...
func InstallVimPlugins(osType string, dirs *localio.Directories) error {
if exists, err := localio.Exists(fmt.Sprintf("%s/.vim_runtime", dirs.HomeDir)); err == nil && exists {
return nil
}
// install awesome vim
if err := localio.RunCommandPipeOutput(fmt.Sprintf("git clone --depth=1 https://github.com/amix/vimrc.git %s/.vim_runtime", dirs.HomeDir)); err != nil {
return err
if exists, err := localio.Exists(fmt.Sprintf("%s/.vim_runtime", dirs.HomeDir)); err == nil && !exists {
// install awesome vim
if err = localio.RunCommandPipeOutput(fmt.Sprintf("git clone --depth=1 https://github.com/amix/vimrc.git %s/.vim_runtime", dirs.HomeDir)); err != nil {
return err
}
}

if err := localio.RunCommandPipeOutput(fmt.Sprintf("cd %s && bash .vim_runtime/install_awesome_vimrc.sh", dirs.HomeDir)); err != nil {
return err
}
Expand Down Expand Up @@ -124,10 +124,6 @@ func InstallVimPlugins(osType string, dirs *localio.Directories) error {

// InstallVimAwesome ...
func InstallVimAwesome(osType string, dirs *localio.Directories, packages *localio.InstalledPackages) error {
if exists, err := localio.Exists(fmt.Sprintf("%s/.vim_runtime", dirs.HomeDir)); err == nil && exists {
return nil
}

switch osType {
case "darwin":
if !localio.CorrectOS("darwin") {
Expand Down

0 comments on commit aba69d4

Please sign in to comment.