Skip to content

Commit

Permalink
Marshal to lowercase.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanhammond committed Apr 12, 2023
1 parent 75675d4 commit 3220eee
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cli/integration_tests/dry_json/monorepo.t
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Setup
},
"expandedOutputs": [],
"framework": "<NO FRAMEWORK DETECTED>",
"envMode": "Infer",
"envMode": "infer",
"environmentVariables": {
"configured": [],
"inferred": [],
Expand Down Expand Up @@ -170,7 +170,7 @@ Setup
},
"expandedOutputs": [],
"framework": "<NO FRAMEWORK DETECTED>",
"envMode": "Infer",
"envMode": "infer",
"environmentVariables": {
"configured": [
"NODE_ENV="
Expand Down
4 changes: 2 additions & 2 deletions cli/integration_tests/dry_json/single_package.t
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Setup
}
}
},
"envMode": "Infer",
"envMode": "infer",
"tasks": [
{
"taskId": "build",
Expand Down Expand Up @@ -69,7 +69,7 @@ Setup
},
"expandedOutputs": [],
"framework": "\u003cNO FRAMEWORK DETECTED\u003e",
"envMode": "Infer",
"envMode": "infer",
"environmentVariables": {
"configured": [],
"inferred": [],
Expand Down
4 changes: 2 additions & 2 deletions cli/integration_tests/dry_json/single_package_no_config.t
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Setup
}
}
},
"envMode": "Infer",
"envMode": "infer",
"tasks": [
{
"taskId": "build",
Expand Down Expand Up @@ -60,7 +60,7 @@ Setup
},
"expandedOutputs": [],
"framework": "\u003cNO FRAMEWORK DETECTED\u003e",
"envMode": "Infer",
"envMode": "infer",
"environmentVariables": {
"configured": [],
"inferred": [],
Expand Down
6 changes: 3 additions & 3 deletions cli/integration_tests/dry_json/single_package_with_deps.t
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Setup
}
}
},
"envMode": "Infer",
"envMode": "infer",
"tasks": [
{
"taskId": "build",
Expand Down Expand Up @@ -80,7 +80,7 @@ Setup
},
"expandedOutputs": [],
"framework": "\u003cNO FRAMEWORK DETECTED\u003e",
"envMode": "Infer",
"envMode": "infer",
"environmentVariables": {
"configured": [],
"inferred": [],
Expand Down Expand Up @@ -128,7 +128,7 @@ Setup
},
"expandedOutputs": [],
"framework": "\u003cNO FRAMEWORK DETECTED\u003e",
"envMode": "Infer",
"envMode": "infer",
"environmentVariables": {
"configured": [],
"inferred": [],
Expand Down
1 change: 1 addition & 0 deletions cli/integration_tests/run_summary/error.t
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Validate that we got a full task summary for the failed task with an error in .e
},
"expandedOutputs": [],
"framework": "",
"envMode": "infer",
"environmentVariables": {
"configured": [],
"inferred": [],
Expand Down
6 changes: 6 additions & 0 deletions cli/internal/util/run_opts.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package util

import "strings"

// EnvMode specifies if we will be using strict env vars
type EnvMode string

Expand All @@ -12,6 +14,10 @@ const (
Strict EnvMode = "Strict"
)

func (s EnvMode) MarshalText() (text []byte, err error) {
return []byte(strings.ToLower(string(s))), nil
}

// RunOpts holds the options that control the execution of a turbo run
type RunOpts struct {
// Force execution to be serially one-at-a-time
Expand Down

0 comments on commit 3220eee

Please sign in to comment.