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
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
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
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
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
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
@@ -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) {

Check warning on line 17 in cli/internal/util/run_opts.go

View workflow job for this annotation

GitHub Actions / Go linting

exported: exported method EnvMode.MarshalText should have comment or be unexported (revive)
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.