Made the code more DRY

This commit is contained in:
Diptanu Choudhury
2015-11-15 23:53:04 -05:00
committed by Alex Dadgar
parent 041f48dc71
commit c01f2a38f5
7 changed files with 15 additions and 16 deletions

View File

@@ -133,8 +133,8 @@ func (d *JavaDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle,
// Build the argument list.
args = append(args, "-jar", filepath.Join(allocdir.TaskLocal, jarName))
if argRaw := driverConfig.Args; argRaw != "" {
args = append(args, argRaw)
if driverConfig.Args != "" {
args = append(args, driverConfig.Args)
}
// Setup the command