Skip to content

Commit 618ef76

Browse files
committed
fix: [CLI] Fixed confusion between single_output and single_event arguments
1 parent d3b233f commit 618ef76

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

misp_stix_converter/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,11 @@ def main():
207207
import_parser.set_defaults(func=_stix_to_misp)
208208

209209
stix_args = parser.parse_args()
210-
if len(stix_args.file) > 1 and stix_args.single_output and stix_args.output_dir is None:
210+
single = (
211+
stix_args.single_output if stix_args.feature == 'export'
212+
else stix_args.single_event
213+
)
214+
if len(stix_args.file) > 1 and single and stix_args.output_dir is None:
211215
stix_args.output_dir = Path(__file__).parents[1] / 'tmp'
212216
feature = 'MISP to STIX' if stix_args.feature == 'export' else 'STIX to MISP'
213217
try:

0 commit comments

Comments
 (0)