haskell / process

Library for dealing with system processes
http://hackage.haskell.org/package/process
Other
87 stars 82 forks source link

unclear whether to combine arguments that themselves have arguments in the argument to specify list of command line arguments #249

Open eflister opened 2 years ago

eflister commented 2 years ago

the most it is explained in the doc is "A list of separate command line arguments to the program"

i was using: readProcessWithExitCode "ffmpeg" ["-i", d, "-c copy", f] "" and getting an error:

Unrecognized option 'c copy'.
Error splitting the argument list: Option not found

very confusing because executing the command in a terminal manually gave no error.

i only luckily happened to try the solution that works: readProcessWithExitCode "ffmpeg" ["-i", d, "-c", "copy", f] ""

this is ffmpeg 4.4.1 on osx 11.6.6 and stack Version 2.7.3, Git revision 7927a3aec32e2b2e5e4fb5be76d0d50eddcc197f x86_64 hpack-0.34.4