diff --git a/service/lib/agama/manager.rb b/service/lib/agama/manager.rb index 2cb2ac6e5d..cf485320d1 100644 --- a/service/lib/agama/manager.rb +++ b/service/lib/agama/manager.rb @@ -211,7 +211,7 @@ def valid? def collect_logs(path: nil) opt = "-d #{path}" if !path.nil? && !path.empty? - %x(agama logs store #{opt}).strip + `agama logs store #{opt}`.strip end # Whatever has to be done at the end of installation diff --git a/service/test/agama/manager_test.rb b/service/test/agama/manager_test.rb index 9ab8e6f26d..f7005a415e 100644 --- a/service/test/agama/manager_test.rb +++ b/service/test/agama/manager_test.rb @@ -215,7 +215,7 @@ describe "#collect_logs" do it "collects the logs and returns the path to the archive" do # %x returns the command output including trailing \n - expect(x).to receive(:`) + expect(subject).to receive(:`) .with("agama logs store ") .and_return("/tmp/y2log-hWBn95.tar.xz\n")