Browse thread
Sys.command and quotes
- Matthieu Dubuget
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-05-05 (08:58) |
From: | Matthieu Dubuget <matthieu.dubuget@g...> |
Subject: | Sys.command and quotes |
Hello, I have a problem with mingw version of ocaml (compiled by hand, or with godi). 1- Is the following reproducible? 2- If yes, do you consider this as a bug? It seems that in "Sys.command s", if the first and the last characters of s are '"', they are elided? It prevents menhir (20090402) to compile on my mingw system with ocamlfind in use (because when ocamlfind is used, the dependencies are found with an ocamlfind ocamldep call). Thanks in advance Objective Caml version 3.11.0 # let cmd = "echo";; val cmd : string = "echo" # let arg1 = "Hello world";; val arg1 : string = "Hello world" # let q = Filename.quote;; val q : string -> string = <fun> # let go c = Sys.command (String.concat " " c);; val go : string list -> int = <fun> # go [cmd;arg1];; Hello world - : int = 0 # go [q cmd; arg1];; Hello world - : int = 0 # go [cmd; q arg1];; "Hello world" - : int = 0 # go [q cmd; q arg1];; 'echo" "Hello' n'est pas reconnu en tant que commande interne ou externe, un programme ex‚cutable ou un fichier de commandes. - : int = 1