diff options
Diffstat (limited to 'pkg/commands/submodules.go')
-rw-r--r-- | pkg/commands/submodules.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/commands/submodules.go b/pkg/commands/submodules.go index 19debf890..1444890f7 100644 --- a/pkg/commands/submodules.go +++ b/pkg/commands/submodules.go @@ -101,7 +101,8 @@ func (c *GitCommand) SubmoduleDelete(submodule *models.SubmoduleConfig) error { } if err := c.OSCommand.RunCommand("git rm --force -r %s", submodule.Path); err != nil { - return err + // if the directory isn't there then that's fine + c.Log.Error(err) } return os.RemoveAll(filepath.Join(c.DotGitDir, "modules", submodule.Path)) @@ -128,3 +129,7 @@ func (c *GitCommand) SubmoduleUpdateUrl(name string, path string, newUrl string) func (c *GitCommand) SubmoduleInit(path string) error { return c.OSCommand.RunCommand("git submodule init %s", path) } + +func (c *GitCommand) SubmoduleUpdate(path string) error { + return c.OSCommand.RunCommand("git submodule update --init %s", path) +} |