Skip to content

Instantly share code, notes, and snippets.

@timvisher
Created May 16, 2012 17:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timvisher/2712514 to your computer and use it in GitHub Desktop.
Save timvisher/2712514 to your computer and use it in GitHub Desktop.
clojure.java.shell/sh - cmd discrepancy
REPL:
> (System/getenv "PATH")
"C:\\Program Files\\ImageMagick-6.7.6-Q16;..."
> (shell/sh "which" "convert")
{:exit 0, :out "C:\\Program Files\\ImageMagick-6.7.6-Q16\\convert.EXE\r\n", :err ""}
> (shell/sh "convert")
{:exit 4, :out "", :err "Must specify a file system\r\n"}
CMD:
>set PATH
Path=C:\Program Files\ImageMagick-6.7.6-Q16;...
>which convert
C:\Windows\System32\convert.EXE
>convert
Must specify a file system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment