Skip to content

Commit c368f7f

Browse files
committed
Use ShellFactory to support windows
1 parent 33f1014 commit c368f7f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/main/java/org/embulk/output/CommandFileOutputPlugin.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,6 @@ public interface PluginTask
3232
public String getCommand();
3333
}
3434

35-
public static final List<String> SHELL = ImmutableList.of(
36-
// TODO use ["PowerShell.exe", "-Command"] on windows?
37-
"sh", "-c"
38-
);
39-
4035
@Override
4136
public ConfigDiff transaction(ConfigSource config, int taskCount,
4237
FileOutputPlugin.Control control)
@@ -68,8 +63,9 @@ public TransactionalFileOutput open(TaskSource taskSource, final int taskIndex)
6863
{
6964
PluginTask task = taskSource.loadTask(PluginTask.class);
7065

66+
List<String> shell = new ShellFactory().build().get();
7167
List<String> cmdline = new ArrayList<String>();
72-
cmdline.addAll(SHELL);
68+
cmdline.addAll(shell);
7369
cmdline.add(task.getCommand());
7470

7571
logger.info("Using command {}", cmdline);

0 commit comments

Comments
 (0)