Skip to content

Commit ed5187c

Browse files
Miauwkeruyunzheng
authored andcommitted
Fix issues
1 parent 98c0aed commit ed5187c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

flow/record/fieldtypes/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ class command(FieldType):
757757
758758
Example:
759759
760+
.. code-block:: text
761+
760762
'c:\\windows\\malware.exe /info' -> windows_path('c:\\windows\\malware.exe) ['/info']
761763
'/usr/bin/env bash' -> posix_path('/usr/bin/env') ['bash']
762764

tests/fieldtypes/test_fieldtypes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,9 +1056,10 @@ def test_command_record() -> None:
10561056
assert record.commando.args == ["-h"]
10571057

10581058
record = TestRecord(commando="something.so -h -q -something")
1059+
args = ["-h", "-q", "-something"]
10591060
assert isinstance(record.commando.executable, _type)
10601061
assert record.commando.executable == "something.so"
1061-
assert record.commando.args == ["-h", "-q", "-something"]
1062+
assert record.commando.args == [" ".join(args)] if os.name == "nt" else args
10621063

10631064

10641065
def test_command_integration(tmp_path: pathlib.Path) -> None:

0 commit comments

Comments
 (0)