arquillian / arquillian-spacelift

Arquillian process and package manager. Makes executing an external process or fetching platform depends dependencies an easier job
4 stars 7 forks source link

Add convenience method workingDirectory(File) into CommandTool. #21

Closed TadeasKriz closed 9 years ago

kpiwko commented 9 years ago

Does it make sense to rather use workingDirectory(Object) and fail runtime if it's not File nor CharSequence?

TadeasKriz commented 9 years ago

I'd rather see something like

class CommandTool {
...
public static final File WORKING_DIRECTORY_NONE = null;
...
}

than leaving this for runtime (the name should be shorter). You would then use:

Tasks.prepare(CommandTool.class)
          .workingDirectory(CommandTool.WORKING_DIRECTORY_NONE)
kpiwko commented 9 years ago

that could be CommandTool.CURRENT_PROCESS_DIRECTORY

http://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html#directory%28java.io.File%29

kpiwko commented 9 years ago

Fixed in https://github.com/arquillian/arquillian-spacelift/commit/b6b99690fe8bcb0158f77746036fe2ef2c0b03ca