Skip to content

Commit

Permalink
:=
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Tran committed Oct 9, 2024
1 parent a2a030d commit d0c3b29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/slurm/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func createEnvFile(Ctx context.Context, config SlurmConfig, podData commonIL.Ret

envs_data = append(envs_data, tmp)

_, err = envfile.WriteString(tmp + "\n")
_, err := envfile.WriteString(tmp + "\n")
if err != nil {
log.G(Ctx).Error(err)
return nil, nil, err
Expand All @@ -220,7 +220,7 @@ func createEnvFile(Ctx context.Context, config SlurmConfig, podData commonIL.Ret
}

// All env variables are written, we flush it now.
err = envfile.Sync()
err := envfile.Sync()
if err != nil {
log.G(Ctx).Error(err)
return nil, nil, err
Expand All @@ -243,7 +243,7 @@ func prepareEnvs(Ctx context.Context, config SlurmConfig, podData commonIL.Retri
envs_data := []string{}

if len(container.Env) > 0 {
envs, envs_data, err = createEnvFile(Ctx, config, podData, container)
envs, envs_data, err := createEnvFile(Ctx, config, podData, container)
if err != nil {
log.G(Ctx).Error(err)
return nil, err
Expand Down

0 comments on commit d0c3b29

Please sign in to comment.