Skip to content

Commit

Permalink
feat: implement strict mode, close #12
Browse files Browse the repository at this point in the history
  • Loading branch information
ilharp committed Apr 29, 2022
1 parent 8fb9f33 commit 6b57d4f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/koi-build/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ tmp=\${HOME}/../tmp
export const defaultKoiConfig = `
mode: portable
target: ${defaultInstance}
strict: true
`.trim()

export const boilerplateVersion = '1a18326a130c33996191a300278bd288f05b24ca'
Expand Down
4 changes: 4 additions & 0 deletions packages/koi/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ var (
defaultConfig = KoiConfig{
Mode: "portable",

Strict: false,

UseDataHome: true,
UseDataTemp: true,
}
Expand All @@ -22,6 +24,8 @@ type KoiConfig struct {
Mode string `yaml:"mode"`
Target string `yaml:"target"`

Strict bool `yaml:"strict"`

// Env override
UseDataHome bool `yaml:"useDataHome"`
UseDataTemp bool `yaml:"useDataTemp"`
Expand Down
2 changes: 1 addition & 1 deletion packages/koi/daemon/node_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func CreateNodeCmd(
} else {
pathSepr = ":"
}
if pathEnv != "" {
if pathEnv != "" && !config.Config.Strict {
pathEnv = config.Config.InternalNodeExeDir + pathSepr + pathEnv
} else {
pathEnv = config.Config.InternalNodeExeDir
Expand Down

0 comments on commit 6b57d4f

Please sign in to comment.