Skip to content

Commit 4b0bbeb

Browse files
committed
Capture cmd for when stmt
1 parent a8f214c commit 4b0bbeb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/plugins/store-files-by-sha1.zeek

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ event file_state_remove(f: fa_file)
1515
local dest = fmt("%s%s-%s.%s", FileExtraction::path, f$source, f$info$sha1, extension);
1616

1717
local cmd = fmt("mv %s %s", orig, dest);
18-
when ( local result = Exec::run([$cmd=cmd]) )
18+
when [cmd] ( local result = Exec::run([$cmd=cmd]) )
1919
{
20-
}
20+
}
2121
f$info$extracted = dest;
2222

2323
}

scripts/plugins/store-files-by-sha256.zeek

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ event file_state_remove(f: fa_file)
3030
local dest = fmt("%s%s-%s.%s", FileExtraction::path, f$source, f$info$sha256, extension);
3131

3232
local cmd = fmt("mv %s %s", orig, dest);
33-
when ( local result = Exec::run([$cmd=cmd]) )
33+
when [cmd] ( local result = Exec::run([$cmd=cmd]) )
3434
{
3535
}
3636
f$info$extracted = dest;

0 commit comments

Comments
 (0)