-
Couldn't load subscription status.
- Fork 8
CTX-6123: Added --verbose flag for all commands that could have detai… #241
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
base: develop
Are you sure you want to change the base?
Conversation
…led execution output. Added message that leads to log file with detailed output after exception happened.
# Conflicts: # coretex/cli/commands/node.py # coretex/cli/modules/intercept.py # coretex/cli/modules/node.py # coretex/cli/modules/utils.py # coretex/utils/docker.py
coretex/cli/modules/utils.py
Outdated
| pass | ||
|
|
||
| # if ctx.params.get('verbose'): | ||
| # VERBOSE = True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this comment be removed?
coretex/cli/modules/utils.py
Outdated
| if param["name"] == "verbose" and param["flag_value"] == True: | ||
| CLISettings.verbose = True | ||
| except: | ||
| pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set verbose to false here
coretex/cli/modules/node.py
Outdated
|
|
||
|
|
||
| def shouldUpdate(image: str) -> bool: | ||
| def shouldUpdate(image: str, ) -> bool: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comma
coretex/cli/modules/intercept.py
Outdated
| logFiles = list(logPath.glob("*.log")) | ||
| latestLogFile = max(logFiles, key = lambda f: f.stat().st_mtime) | ||
|
|
||
| errorEcho(f"Exception: {str(exc)}.\nYou can see detailed logs here: {latestLogFile}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An error occured. You can see the detailed logs at {filepath}
coretex/cli/commands/node.py
Outdated
| @click.option("--verbose", "verbose", is_flag = True, help = "Shows detailed output of command execution.") | ||
| @onBeforeCommandExecute(node_module.initializeNodeConfiguration) | ||
| def update(autoAccept: bool, autoDecline: bool) -> None: | ||
| def update(autoAccept: bool, autoDecline: bool, verbose: bool = False) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to have verbose defined explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
coretex/cli/commands/node.py
Outdated
| @click.option("--verbose", "verbose", is_flag = True, help = "Shows detailed output of command execution.") | ||
| @onBeforeCommandExecute(node_module.initializeNodeConfiguration) | ||
| def start(image: Optional[str]) -> None: | ||
| def start(image: Optional[str], verbose: bool = False) -> None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to have verbose defined explicitly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
…click.group and click.command decorator with slight changes that serve our needs. onBeforeCommandExecute callback is deleted all functionality is now in base_group and base_command. Minor code cleanup in scope of this task (unused imports etc.)
…true since they change the output of the command and json cant be loaded no more.
…function argument.
…led execution output. Added message that leads to log file with detailed output after exception happened.