diff --git a/Changes b/Changes index b34ab79..bfe4c1a 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,7 @@ Revision history for App-Rak {{$NEXT}} - Fix issue with bare literal * being interpreted as a Whatever, rather than as a literal '*' + - Fix issue with --backtrace without file containing backtrace 0.2.3 2022-11-05T11:56:14+01:00 - Up dependency on String::Utils to get "has-marks" support diff --git a/lib/App/Rak.rakumod b/lib/App/Rak.rakumod index 1ce10aa..44da133 100644 --- a/lib/App/Rak.rakumod +++ b/lib/App/Rak.rakumod @@ -2895,13 +2895,16 @@ my sub action-per-line(--> Nil) { %listing := False unless $pattern; %listing := False if $before-context || $after-context; + # $pattern here is supposed to be the file with the backtrace $rak := Rak.new: result => $reading-from-stdin ?? produce-result($*IN.slurp(:close)) !! @positionals ?? meh "Can only specify a single file with a backtrace." - !! $pattern.IO.e - ?? produce-result($pattern.IO.slurp) - !! meh "handling backtrace from file(s) NYI"; + !! $pattern + ?? $pattern.IO.e + ?? produce-result($pattern.IO.slurp) + !! meh "handling backtrace from file(s) NYI" + !! meh "Must specify a file with a backtrace."; rak-results; return;