Skip to content

Conversation

@ashwathishiva
Copy link
Contributor

Fixes a situation where path was not built appropriately for windows

@marccampbell
Copy link
Member

Thanks!

@marccampbell marccampbell merged commit 38aef19 into replicatedhq:master Mar 26, 2020

func analyzeTextAnalyze(analyzer *troubleshootv1beta1.TextAnalyze, getCollectedFileContents func(string) ([]byte, error)) (*AnalyzeResult, error) {
fullPath := path.Join(analyzer.CollectorName, analyzer.FileName)
fullPath := filepath.Join(analyzer.CollectorName, analyzer.FileName)

Choose a reason for hiding this comment

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

@CodeLingoBot capture avoid path.Join
path.Join only works for paths separated by forward slashes. This can be problematic on Windows. Use filepath.Join to create paths in a way that is compatible with the target operating systems defined file paths.

Copy link

Choose a reason for hiding this comment

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

Rule captured at https://dash.codelingo.io/repos/replicatedhq/troubleshoot/rules/1403

CodeLingoBot Help

When responding to PR-level comments, I understand the following commands:

  • capture to capture the context for a fresh rule.

  • review to trigger a fresh review.

When responding to comments on specific lines of code, I understand the following commands:

  • capture to capture the context for a fresh rule.

  • review to trigger a fresh review.

  • ignore to ignore the parent review comment.

  • unignore to stop ignoring a parent review comment.

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.

4 participants