Skip to content

Commit

Permalink
apply formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
shinhs0506 committed Jun 12, 2022
1 parent 3067c2c commit b3691d2
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions pkg/config/config_linux.go
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
package config

import (
"io/ioutil"
"strings"
"io/ioutil"
"strings"
)

func isWSL() bool {
data, err := ioutil.ReadFile("/proc/sys/kernel/osrelease");
return err == nil && strings.Contains(string(data), "microsoft")
data, err := ioutil.ReadFile("/proc/sys/kernel/osrelease")
return err == nil && strings.Contains(string(data), "microsoft")
}

// GetPlatformDefaultConfig gets the defaults for the platform
func GetPlatformDefaultConfig() OSConfig {

if isWSL() {
return OSConfig{
EditCommand: ``,
EditCommandTemplate: "",
OpenCommand: `powershell.exe start explorer.exe {{filename}} >/dev/null`,
OpenLinkCommand: `powershell.exe start {{link}} >/dev/null`,
}
}
if isWSL() {
return OSConfig{
EditCommand: ``,
EditCommandTemplate: "",
OpenCommand: `powershell.exe start explorer.exe {{filename}} >/dev/null`,
OpenLinkCommand: `powershell.exe start {{link}} >/dev/null`,
}
}

return OSConfig{
EditCommand: ``,
Expand Down

0 comments on commit b3691d2

Please sign in to comment.