Skip to content

Commit

Permalink
Skip verbose info message when already printing verbose output
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota committed Jan 22, 2023
1 parent 1ef6727 commit b4366be
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/compiler/crystal/compiler.cr
Original file line number Diff line number Diff line change
Expand Up @@ -626,11 +626,12 @@ module Crystal
end

private def linker_not_found(exc_class, linker_name)
verbose_info = "\nRun with `--verbose` to print the full linker command." unless verbose?
case exc_class
when File::AccessDeniedError
error "Could not execute linker: `#{linker_name}`: Permission denied\nRun with `--verbose` to print the full linker command."
error "Could not execute linker: `#{linker_name}`: Permission denied#{verbose_info}"
else
error "Could not execute linker: `#{linker_name}`: File not found\nRun with `--verbose` to print the full linker command."
error "Could not execute linker: `#{linker_name}`: File not found#{verbose_info}"
end
end

Expand Down

0 comments on commit b4366be

Please sign in to comment.