Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alessio Perugini <alessioper.98@gmail.com>
  • Loading branch information
cmaglie and alessio-perugini committed May 29, 2023
1 parent dfc606e commit c618f3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/builder/diagnostics/compiler_detection.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var runProcess = func(args ...string) []string {
}

// DetectCompilerFromCommandLine tries to detect a compiler from a given command line.
// If probleCompiler is true, the compiler may be executed with different flags to
// If probeCompiler is true, the compiler may be executed with different flags to
// infer the version or capabilities.
func DetectCompilerFromCommandLine(args []string, probeCompiler bool) *DetectedCompiler {
if len(args) == 0 {
Expand All @@ -61,7 +61,7 @@ func DetectCompilerFromCommandLine(args []string, probeCompiler bool) *DetectedC
}

if family == "gcc" && probeCompiler {
// Run "gcc --verion" to obtain more info
// Run "gcc --version" to obtain more info
res.DetailedVersion = runProcess(args[0], "--version")

// Usually on the first line we get the compiler architecture and
Expand Down
1 change: 0 additions & 1 deletion internal/builder/diagnostics/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ func runParserTest(t *testing.T, testFile string) {
require.NoError(t, err)
golden, err := paths.New("testdata", "compiler_outputs", testFile+".json").ReadFile()
require.NoError(t, err)
// fmt.Println(string(output))
require.Equal(t, string(golden), string(output))
}

0 comments on commit c618f3b

Please sign in to comment.