Skip to content

Commit

Permalink
Merge pull request #2923 from nexB/2654-os-arch-in-scan-header
Browse files Browse the repository at this point in the history
Add system environment to scan headers
  • Loading branch information
pombredanne authored Apr 26, 2022
2 parents da33cea + bd6007f commit 15ff1ed
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/scancode/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@
# Import early because of the side effects
import scancode_config

from collections import defaultdict
from functools import partial
import os
import logging
import os
import platform
import sys
import traceback

from collections import defaultdict
from functools import partial
from time import sleep
from time import time
import traceback

import commoncode

# this exception is not available on posix
try:
Expand Down Expand Up @@ -847,6 +851,14 @@ def echo_func(*_args, **_kwargs):
cle.output_format_version = scancode_config.__output_format_version__
cle.notice = notice
cle.options = pretty_params or {}
# useful for debugging
cle.extra_data['system_environment'] = system_environment= {}
system_environment['operating_system'] = commoncode.system.current_os
system_environment['cpu_architecture'] = commoncode.system.current_arch
system_environment['platform'] = platform.platform()
system_environment['platform_version'] = platform.version()
system_environment['python_version'] = sys.version

cle.extra_data['spdx_license_list_version'] = scancode_config.spdx_license_list_version
if outdated:
cle.extra_data['OUTDATED'] = outdated
Expand Down

0 comments on commit 15ff1ed

Please sign in to comment.