Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ envman run bash -c 'echo "Environment test: $MY_TEST_ENV_KEY"'
Add/store an environment variable:

```
envman add --key MY_SECERT_ENV_KEY --value 'this is a secret value' --sensitive
envman add --key MY_SECRET_ENV_KEY --value 'this is a secret value' --sensitive
```

*Why `bash -c` is required? Because `echo` in itself
Expand Down
8 changes: 4 additions & 4 deletions env/expand.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ type Action int
const (
// InvalidAction represents an unexpected state
InvalidAction Action = iota + 1
// SetAction is an environment variable assignement, like os.Setenv
// SetAction is an environment variable assignment, like os.Setenv
SetAction
// UnsetAction is an action to clear (if existing) an environment variable, like os.Unsetenv
UnsetAction
// SkipAction means that no action is performed (usually for an env with an empty value)
SkipAction
)

// Command describes an action performed on an envrionment variable
// Command describes an action performed on an environment variable
type Command struct {
Action Action
Variable Variable
Expand Down Expand Up @@ -125,7 +125,7 @@ func GetDeclarationsSideEffects(newEnvs []models.EnvironmentItemModel, envSource
delete(evaluatedNewEnvs, command.Variable.Key)
case SkipAction:
default:
return DeclarationSideEffects{}, fmt.Errorf("invalid case for environement declaration action: %#v", command)
return DeclarationSideEffects{}, fmt.Errorf("invalid case for environment declaration action: %#v", command)
}
}

Expand All @@ -136,7 +136,7 @@ func GetDeclarationsSideEffects(newEnvs []models.EnvironmentItemModel, envSource
}, nil
}

// getDeclarationCommand maps a variable to be daclered (env) to an expanded env key and value.
// getDeclarationCommand maps a variable to be declared (env) to an expanded env key and value.
// The current process environment is not changed.
func getDeclarationCommand(env models.EnvironmentItemModel, envs map[string]string) (Command, error) {
envKey, envValue, err := env.GetKeyValuePair()
Expand Down