Skip to content

Commit 995a0a6

Browse files
committed
fix #1
1 parent 47aacbb commit 995a0a6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

main.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,18 @@ func run(ctx context.Context, provider secrets.Provider, commandSlice []string)
146146
log.WithError(err).Error("failed to resolve secrets")
147147
}
148148

149+
// start the specified command
150+
log.WithFields(log.Fields{
151+
"command": commandStr,
152+
"args": argsSlice,
153+
"env": cmd.Env,
154+
}).Debug("starting command")
155+
err = cmd.Start()
156+
if err != nil {
157+
log.WithError(err).Error("failed to start command")
158+
return err
159+
}
160+
149161
// Goroutine for signals forwarding
150162
go func() {
151163
for sig := range sigs {
@@ -162,18 +174,6 @@ func run(ctx context.Context, provider secrets.Provider, commandSlice []string)
162174
}
163175
}()
164176

165-
// start the specified command
166-
log.WithFields(log.Fields{
167-
"command": commandStr,
168-
"args": argsSlice,
169-
"env": cmd.Env,
170-
}).Debug("starting command")
171-
err = cmd.Start()
172-
if err != nil {
173-
log.WithError(err).Error("failed to start command")
174-
return err
175-
}
176-
177177
// wait for the command to exit
178178
err = cmd.Wait()
179179
if err != nil {

0 commit comments

Comments
 (0)