From edd00e16a05148c6b4077aefc93e032fd8d6d049 Mon Sep 17 00:00:00 2001 From: "Pierre-Yves B." <10694593+PyvesB@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:44:54 +0200 Subject: [PATCH] Quote Ruby script path to handle folders containing spaces --- .../eclipse_solargraph/launch/run/RubyRunDelegate.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/launch/run/RubyRunDelegate.java b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/launch/run/RubyRunDelegate.java index d8fadf3..3d529df 100644 --- a/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/launch/run/RubyRunDelegate.java +++ b/eclipse-solargraph-plugin/src/main/java/io/github/pyvesb/eclipse_solargraph/launch/run/RubyRunDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2019 Red Hat Inc. and others. + * Copyright (c) 2019-2024 Red Hat Inc. and others. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at @@ -11,6 +11,7 @@ * Alexander Kurtakov (Red Hat Inc.) - Initial implementation * Pierre-Yves B. (pyvesdev@gmail.com) - Various improvements * Pierre-Yves B. (pyvesdev@gmail.com) - Debugger support + * Pierre-Yves B. (pyvesdev@gmail.com) - Quote script path *******************************************************************************/ package io.github.pyvesb.eclipse_solargraph.launch.run; @@ -35,7 +36,7 @@ public void launch(ILaunchConfiguration configuration, String mode, ILaunch laun // a config attribute reader threw exception & was logged return; } - String command = "ruby " + script + " " + arguments; + String command = "ruby \"" + script + "\" " + arguments; LaunchHelper.createJob(launch, command, workingDirectory).schedule(); }