Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By/yaml splitter fix #4696

Merged
merged 6 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .changelog/4695.yml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out from - #4695, which will be merged before these changes.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Determining logger setup via environment variable.
type: fix
pr_number: 4695
8 changes: 7 additions & 1 deletion demisto_sdk/__init__.py
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked out from - #4695, which will be merged before these changes.

Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
if __name__ in ["__main__", "demisto_sdk"]:
import os

if os.environ.get("DEMISTO_SDK_SKIP_LOGGER_SETUP", "False").lower() not in [
"true",
"yes",
"1",
]:
from demisto_sdk.commands.common.logger import logging_setup

logging_setup(initial=True, calling_function="__init__")
2 changes: 1 addition & 1 deletion demisto_sdk/commands/split/ymlsplitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def extract_to_package_format(
yaml_out = f"{output_path}/{base_name}.yml"
logger.debug(f"Creating yml file: {yaml_out} ...")
if self.yml_data:
yaml_obj = self.yml_data
yaml_obj = self.yml_data.copy()
else:
yaml_obj = get_file(self.input, raise_on_error=True)

Expand Down
Loading