blob: a483b1a607d1f5128ef45832d459171116766467 [file] [log] [blame]
// Copyright 2018 The Goma Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package remoteexec
// TODO: share exec/javac.go ?
// javacOutputDirs returns output directories from javac command line.
func javacOutputDirs(args []string) []string {
var dirs []string
dirArg := false
for _, arg := range args {
switch {
case dirArg:
dirs = append(dirs, arg)
dirArg = false
case arg == "-s" || arg == "-d":
dirArg = true
}
}
return dirs
}