You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In insight/cli.py, def main() is defined, but there is no if __name__ == "__main__": main() block. If a user runs python -m insight.cli or executes python path/to/insight/cli.py, the script exits silently without executing main().
When the specified target path does not exist, cli.py prints an error message but executes return, which exits with returncode 0. This causes automated scripts and CI pipelines to interpret the failed run as a success.
Affected Files
insight/cli.py:26-38
Proposed Solution
Add if __name__ == "__main__": main() at the end of insight/cli.py.
Replace return with sys.exit(1) when not os.path.exists(args.path).
Problem Description
insight/cli.py,def main()is defined, but there is noif __name__ == "__main__": main()block. If a user runspython -m insight.clior executespython path/to/insight/cli.py, the script exits silently without executingmain().cli.pyprints an error message but executesreturn, which exits with returncode0. This causes automated scripts and CI pipelines to interpret the failed run as a success.Affected Files
insight/cli.py:26-38Proposed Solution
if __name__ == "__main__": main()at the end ofinsight/cli.py.returnwithsys.exit(1)whennot os.path.exists(args.path).