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 the 'repo already exist' bug and improve error logging for terrascan init #552

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

devang-gaur
Copy link
Contributor

Fixes a part of #551

@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #552 (b24b89b) into master (efeed62) will decrease coverage by 0.00%.
The diff coverage is 31.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #552      +/-   ##
==========================================
- Coverage   76.98%   76.98%   -0.01%     
==========================================
  Files          98       98              
  Lines        2364     2368       +4     
==========================================
+ Hits         1820     1823       +3     
+ Misses        404      402       -2     
- Partials      140      143       +3     
Impacted Files Coverage Δ
pkg/cli/init.go 25.00% <0.00%> (ø)
pkg/initialize/run.go 50.00% <33.33%> (ø)
pkg/downloader/getter.go 87.87% <0.00%> (+1.51%) ⬆️

@@ -61,6 +61,12 @@ func DownloadPolicies() error {

tempPath := filepath.Join(os.TempDir(), "terrascan")
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @dev-gaur,
Would it make sense to use ioutil.TempDir() instead of os.TempDir()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

eureka!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changes made. PTAL again

@sonarcloud
Copy link

sonarcloud bot commented Feb 17, 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

@kanchwala-yusuf kanchwala-yusuf merged commit 10d6706 into tenable:master Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants