Skip to content

Commit

Permalink
Capture cmd for when statement
Browse files Browse the repository at this point in the history
This is required since quite a while.
  • Loading branch information
awelzel committed Sep 13, 2024
1 parent a8f214c commit 616d62e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/plugins/store-files-by-sha1.zeek
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ event file_state_remove(f: fa_file)
local dest = fmt("%s%s-%s.%s", FileExtraction::path, f$source, f$info$sha1, extension);

local cmd = fmt("mv %s %s", orig, dest);
when ( local result = Exec::run([$cmd=cmd]) )
when [cmd] ( local result = Exec::run([$cmd=cmd]) )
{
}
}
f$info$extracted = dest;

}
2 changes: 1 addition & 1 deletion scripts/plugins/store-files-by-sha256.zeek
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ event file_state_remove(f: fa_file)
local dest = fmt("%s%s-%s.%s", FileExtraction::path, f$source, f$info$sha256, extension);

local cmd = fmt("mv %s %s", orig, dest);
when ( local result = Exec::run([$cmd=cmd]) )
when [cmd] ( local result = Exec::run([$cmd=cmd]) )
{
}
f$info$extracted = dest;
Expand Down

0 comments on commit 616d62e

Please sign in to comment.