Project

General

Profile

Actions

Bug #9435

closed

Kernel.system problem

Added by windwiny (wind winy) almost 11 years ago. Updated over 1 year ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
2.0.0
Backport:
[ruby-core:59922]
Tags:

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
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0