summary refs log tree commit diff
path: root/pkgs/applications/office/gnucash/0004-exec-fq-wrapper.patch
blob: 8b00b275e59cd51ab480c7e7140db3514031f264 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--- a/libgnucash/app-utils/gnc-quotes.cpp	2023-09-23 07:04:21.000000000 +0900
+++ b/libgnucash/app-utils/gnc-quotes.cpp	2023-09-25 11:58:46.482696433 +0900
@@ -125,7 +125,6 @@
 
 class GncFQQuoteSource final : public GncQuoteSource
 {
-    const bfs::path c_cmd;
     std::string c_fq_wrapper;
     std::string m_version;
     StrVec m_sources;
@@ -148,13 +147,12 @@
 static const std::string empty_string{};
 
 GncFQQuoteSource::GncFQQuoteSource() :
-c_cmd{bp::search_path("perl")},
 m_version{}, m_sources{}, m_api_key{}
 {
     char *bindir = gnc_path_get_bindir();
     c_fq_wrapper = std::string(bindir) + "/finance-quote-wrapper";
     g_free(bindir);
-    StrVec args{"-w", c_fq_wrapper, "-v"};
+    StrVec args{"-v"};
     auto [rv, sources, errors] = run_cmd(args, empty_string);
     if (rv)
     {
@@ -200,7 +198,7 @@
 QuoteResult
 GncFQQuoteSource::get_quotes(const std::string& json_str) const
 {
-    StrVec args{"-w", c_fq_wrapper, "-f" };
+    StrVec args{"-f" };
     return run_cmd(args, json_str);
 }
 
@@ -218,7 +216,7 @@
         auto input_buf = bp::buffer (json_string);
 	bp::child process;
 	if (m_api_key.empty())
-	    process = bp::child(c_cmd, args,
+	    process = bp::child(c_fq_wrapper, args,
 				bp::std_out > out_buf,
 				bp::std_err > err_buf,
 				bp::std_in < input_buf,
@@ -227,7 +225,7 @@
 #endif
 				svc);
 	else
-	    process = bp::child(c_cmd, args,
+	    process = bp::child(c_fq_wrapper, args,
 				bp::std_out > out_buf,
 				bp::std_err > err_buf,
 				bp::std_in < input_buf,