Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Apr 12, 2020
1 parent a6bac16 commit 6640dad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions pkg/gui/dependencies_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,19 @@ func (gui *Gui) handleDepUninstall() error {

return gui.createMenu("Uninstall dependency", menuItems, createMenuOptions{showCancel: true})
}

func (gui *Gui) newMainCommand(cmdStr string, contextKey string) error {
cmd := gui.OSCommand.ExecutableFromString(cmdStr)
if err := gui.newPtyTask("main", cmd, cmdStr); err != nil {
gui.Log.Error(err)
}
return nil
}

func (gui *Gui) selectedDepContextKey() (string, error) {
selectedDep := gui.getSelectedDependency()
if selectedDep == nil {
return "", gui.createErrorPanel("no selected dependency")
}
return fmt.Sprintf("package:%s|dep:%s|kind:%s", gui.currentPackage().Path, selectedDep.Name, selectedDep.Kind), nil
}

0 comments on commit 6640dad

Please sign in to comment.