Skip to content

Commit d558c94

Browse files
committed
add bug report in CLI calls
1 parent 541e802 commit d558c94

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/messages/bugReport.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ function bugReport(opt, ME)
1010

1111
% (C) Copyright 2022 bidspm developers
1212

13+
opt.verbosity = 3;
1314
if nargin < 1
14-
opt.verbosity = 2;
1515
opt.dryRun = false;
1616
end
1717

@@ -23,7 +23,14 @@ function bugReport(opt, ME)
2323
json.ME = ME;
2424
end
2525

26-
logFile = sprintf('error_%s.log', timeStamp());
26+
logFile = spm_file(sprintf('error_%s.log', timeStamp()), 'cpath');
2727
bids.util.jsonwrite(logFile, json);
28+
printToScreen(sprintf(['\nERROR LOG SAVED:\n\t%s\n', ...
29+
'Use it when opening an issue <a href="%s">%s</a>.\n'], ...
30+
logFile, ...
31+
[returnRepoURL() '/issues/new/choose'], ...
32+
[returnRepoURL() '/issues/new/choose']), ...
33+
opt, ...
34+
'format', 'red');
2835

2936
end

0 commit comments

Comments
 (0)