File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -261,9 +261,14 @@ yq_bin = "yq",
261
261
-- Function to execute when adding a new note. `ref` is the citation key of the
262
262
-- relevant entry and `notes_name` is defined in `papis_python` above.
263
263
create_new_note_fn = function (papis_id , notes_name )
264
+ local testing_session = require (" papis.config" )[" enable_modules" ][" testing" ]
265
+ local testing_conf_path = " "
266
+ if testing_session then
267
+ testing_conf_path = " -c ./tests/papis_config "
268
+ end
264
269
vim .fn .system (
265
270
string.format (
266
- " papis update --set notes %s papis_id:%s" ,
271
+ " papis " .. testing_conf_path .. " update --set notes %s papis_id:%s" ,
267
272
vim .fn .shellescape (notes_name ),
268
273
vim .fn .shellescape (papis_id )
269
274
)
Original file line number Diff line number Diff line change @@ -52,9 +52,14 @@ local default_config = {
52
52
db_path = vim .fn .stdpath (" data" ) .. " /papis_db/papis-nvim.sqlite3" ,
53
53
yq_bin = " yq" ,
54
54
create_new_note_fn = function (papis_id , notes_name )
55
+ local testing_session = require (" papis.config" )[" enable_modules" ][" testing" ]
56
+ local testing_conf_path = " "
57
+ if testing_session then
58
+ testing_conf_path = " -c ./tests/papis_config "
59
+ end
55
60
vim .fn .system (
56
61
string.format (
57
- " papis update --set notes %s papis_id:%s" ,
62
+ " papis " .. testing_conf_path .. " update --set notes %s papis_id:%s" ,
58
63
vim .fn .shellescape (notes_name ),
59
64
vim .fn .shellescape (papis_id )
60
65
)
You can’t perform that action at this time.
0 commit comments