Actions
Bug #9435
closedKernel.system problem
Description
if ENV['PATH'] include double quotes, Kernel.system cann't find it.
windows OS, open a cmd window
set PATH="C:\Program Files\7-Zip";%PATH%
7z -h # can run it
pry
system '7z -h' # can't find
and, if command include double quotes, system can't find too.
system '"C:\Program Files\7-Zip\7z" -h' # ok
system '"C:\Program Files\7-Zip"\7z -h' # can't find
system '"C:\Program Files\7-Zip\"7z -h' # can't find
Updated by nobu (Nobuyoshi Nakada) almost 11 years ago
- Description updated (diff)
You don't need quotes there.
Updated by nagachika (Tomoyuki Chikanaga) almost 11 years ago
Hello, wind.
Thank you for your report.
Could you confirm it can be reproducible with 2.1.0?
Updated by windwiny (wind winy) over 10 years ago
Tomoyuki Chikanaga wrote:
Hello, wind.
Thank you for your report.Could you confirm it can be reproducible with 2.1.0?
hi, ruby 2.1.0 has same problem.
Updated by nagachika (Tomoyuki Chikanaga) over 10 years ago
- Tracker changed from Backport to Bug
- Project changed from Backport200 to Ruby master
Updated by jeremyevans0 (Jeremy Evans) about 1 year ago
- Status changed from Open to Rejected
I don't think this is a bug in Ruby, it is a general issue with Windows. As @nobu (Nobuyoshi Nakada) mentioned, you shouldn't use quotes in PATH
. See https://serverfault.com/questions/349179/path-variable-and-quotation-marks-windows/349216#349216
Actions
Like0
Like0Like0Like0Like0Like0