From: "jeremyevans0 (Jeremy Evans) via ruby-core" Date: 2023-08-22T21:12:16+00:00 Subject: [ruby-core:114449] [Ruby master Bug#9435] Kernel.system problem Issue #9435 has been updated by jeremyevans0 (Jeremy Evans). 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 mentioned, you shouldn't use quotes in `PATH`. See https://serverfault.com/questions/349179/path-variable-and-quotation-marks-windows/349216#349216 ---------------------------------------- Bug #9435: Kernel.system problem https://bugs.ruby-lang.org/issues/9435#change-104206 * Author: windwiny (wind winy) * Status: Rejected * Priority: Normal * ruby -v: 2.0.0 ---------------------------------------- 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 ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/