diff --git a/src/resolvers/fossil.cr b/src/resolvers/fossil.cr index 94f6159d..6d67da2d 100644 --- a/src/resolvers/fossil.cr +++ b/src/resolvers/fossil.cr @@ -469,7 +469,7 @@ module Shards !files.strip.empty? end - private def capture(command, path = local_path) + private def capture(command : String, path : String = local_path) : String run(command, capture: true, path: path).not_nil! end diff --git a/src/resolvers/git.cr b/src/resolvers/git.cr index 62dd9b93..7ddf5169 100644 --- a/src/resolvers/git.cr +++ b/src/resolvers/git.cr @@ -360,7 +360,7 @@ module Shards false end - private def origin_url + private def origin_url : String @origin_url ||= capture("git ls-remote --get-url origin --bare").strip end @@ -415,7 +415,7 @@ module Shards !files.strip.empty? end - private def capture(command, path = local_path) + private def capture(command : String, path : String = local_path) : String run(command, capture: true, path: path).not_nil! end diff --git a/src/resolvers/hg.cr b/src/resolvers/hg.cr index f29239ae..c523ecee 100644 --- a/src/resolvers/hg.cr +++ b/src/resolvers/hg.cr @@ -379,7 +379,7 @@ module Shards File.exists?(File.join(local_path, ".hg", "dirstate")) end - private def origin_url + private def origin_url : String @origin_url ||= capture("hg paths default").strip end @@ -433,7 +433,7 @@ module Shards run("hg files -r #{Process.quote(ref.to_hg_revset)} -- #{Process.quote(path)}", raise_on_fail: false) end - private def capture(command, path = local_path) + private def capture(command : String, path : String = local_path) : String run(command, capture: true, path: path).as(String) end