Skip to content

Commit

Permalink
updated: default config app pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
awakchau-tibco committed Dec 16, 2019
1 parent 732a4ec commit 7cf54f2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ import (

// Constants for local env
const (
DefaultAppPattern = `^.+-linux_amd64.*$`
ConfigFile = ".run-flogo-app"
DefaultAppPatternLinux = `^.+-linux_amd64.*$`
DefaultAppPatternWindows = `^.+-windows_amd64.*$`
DefaultAppPatternDarwin = `^.+-darwin_amd64.*$`
ConfigFile = "run-flogo-app-config.json"
)

// App holds the environmet variables for the user
Expand Down Expand Up @@ -72,7 +74,13 @@ func (a *App) WriteConfig() {
func (a *App) loadDefaultConfig() {
fmt.Print("loading default config...")
a.AppDir = path.Join(GetUserHomeDir(), "Downloads")
a.AppPattern = DefaultAppPattern
if runtime.GOOS == "linux" {
a.AppPattern = DefaultAppPatternLinux
} else if runtime.GOOS == "windows" {
a.AppPattern = DefaultAppPatternWindows
} else if runtime.GOOS == "darwin" {
a.AppPattern = DefaultAppPatternDarwin
}
}

func (a *App) validateConfig() {
Expand Down

0 comments on commit 7cf54f2

Please sign in to comment.