Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 83244a8

Browse files
committed
Add environment to env read command
1 parent 0fcd566 commit 83244a8

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

internals/secrethub/env_read.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,26 @@ import (
77

88
// EnvReadCommand is a command to read the value of a single environment variable.
99
type EnvReadCommand struct {
10-
io ui.IO
11-
newClient newClientFunc
10+
io ui.IO
11+
newClient newClientFunc
12+
environment *environment
1213
}
1314

1415
// NewEnvReadCommand creates a new EnvReadCommand.
1516
func NewEnvReadCommand(io ui.IO, newClient newClientFunc) *EnvReadCommand {
1617
return &EnvReadCommand{
17-
io: io,
18-
newClient: newClient,
18+
io: io,
19+
newClient: newClient,
20+
environment: newEnvironment(io),
1921
}
2022
}
2123

2224
// Register adds a CommandClause and it's args and flags to a Registerer.
2325
func (cmd *EnvReadCommand) Register(r command.Registerer) {
2426
clause := r.Command("read", "Read the value of a single environment variable.")
2527

28+
cmd.environment.register(clause)
29+
2630
command.BindAction(clause, cmd.Run)
2731
}
2832

0 commit comments

Comments
 (0)