From 95b2e9540a55973a6ab32dd4522648634ab15b0a Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Mon, 3 Jan 2022 15:15:26 +1100 Subject: update tests --- pkg/commands/oscommands/os.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'pkg/commands/oscommands/os.go') diff --git a/pkg/commands/oscommands/os.go b/pkg/commands/oscommands/os.go index 5a7c5e0bb..c5c6e3649 100644 --- a/pkg/commands/oscommands/os.go +++ b/pkg/commands/oscommands/os.go @@ -73,9 +73,7 @@ func NewCmdLogEntry(cmdStr string, span string, commandLine bool) CmdLogEntry { } // NewOSCommand os command runner -func NewOSCommand(common *common.Common) *OSCommand { - platform := getPlatform() - +func NewOSCommand(common *common.Common, platform *Platform) *OSCommand { c := &OSCommand{ Common: common, Platform: platform, @@ -138,7 +136,6 @@ func FileType(path string) string { return "file" } -// OpenFile opens a file with the given func (c *OSCommand) OpenFile(filename string) error { commandTemplate := c.UserConfig.OS.OpenCommand templateValues := map[string]string{ @@ -148,7 +145,6 @@ func (c *OSCommand) OpenFile(filename string) error { return c.Cmd.NewShell(command).Run() } -// OpenLink opens a file with the given func (c *OSCommand) OpenLink(link string) error { c.LogCommand(fmt.Sprintf("Opening link '%s'", link), false) commandTemplate := c.UserConfig.OS.OpenLinkCommand -- cgit v1.2.3