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

Fix exit code on error #458

Merged

Conversation

patilpankaj212
Copy link
Contributor

  • This PR fixes Terrascan doesn't exit with error on CLI or Parsing errors. #442 (addressed both scan and init commands)
  • Removed the code for scan as default command. The function doesn't serve the purpose. Ideally if no commands are specified then help should be printed and if there is a typo in command then cobra prints out useful message with hints.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 7, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jan 7, 2021

Codecov Report

Merging #458 (c4b9aa7) into master (0f79088) will increase coverage by 0.34%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #458      +/-   ##
==========================================
+ Coverage   74.11%   74.46%   +0.34%     
==========================================
  Files          87       87              
  Lines        2013     2005       -8     
==========================================
+ Hits         1492     1493       +1     
+ Misses        388      379       -9     
  Partials      133      133              
Impacted Files Coverage Δ
pkg/cli/register.go 6.25% <ø> (+2.25%) ⬆️
pkg/cli/scan.go 77.77% <0.00%> (ø)
pkg/cli/init.go 40.00% <50.00%> (+15.00%) ⬆️

@kanchwala-yusuf kanchwala-yusuf merged commit c39a76d into tenable:master Jan 7, 2021
@patilpankaj212 patilpankaj212 deleted the fix-exit-code-on-error branch January 7, 2021 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terrascan doesn't exit with error on CLI or Parsing errors.
2 participants