Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/resolvers/git.cr
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,10 @@ module Shards
str = error.to_s
if str.starts_with?("error: ") && (idx = str.index('\n'))
message = str[7...idx]
raise Error.new("Failed #{command} (#{message}). Maybe a commit, branch or file doesn't exist?")
else
raise Error.new("Failed #{command}.\n#{str}")
end
raise Error.new("Failed #{command} (#{message}). Maybe a commit, branch or file doesn't exist?")
end
end

Expand Down
4 changes: 2 additions & 2 deletions src/resolvers/hg.cr
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,10 @@ module Shards
str = error.to_s
if str.starts_with?("abort: ") && (idx = str.index('\n'))
message = str[7...idx]
raise Error.new("Failed #{command} (#{message}). Maybe a commit, branch, bookmark or file doesn't exist?")
else
message = str
raise Error.new("Failed #{command}.\n#{str}")
end
raise Error.new("Failed #{command} (#{message}). Maybe a commit, branch, bookmark or file doesn't exist?")
end
end

Expand Down