summarylogtreecommitdiffstats
path: root/zarn.pl.patch
blob: ec0db3158760014867002f3321cfdda4a3f6183b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--- a/zarn.pl	2024-05-18 22:25:07.750911543 +0200
+++ b/zarn.pl	2024-05-18 22:28:18.394246542 +0200
@@ -14,7 +14,9 @@
 our $VERSION = '0.0.9';
 
 sub main {
-    my $rules = "rules/default.yml";
+    use File::Basename;
+    my $dirname = -l __FILE__ ? dirname(readlink(__FILE__)) : dirname(__FILE__); 
+    my $rules = "$dirname/rules/default.yml";
     my ($source, $ignore, $sarif, @results);
 
     Getopt::Long::GetOptions (