File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -31,9 +31,15 @@ def initialize(spoom_context:)
3131 [ key , value ]
3232 end . to_h #: Hash[String, String | bool | nil]
3333
34+ # `--cache-dir=""` and `--cache-dir=` both disable the cache. We model that with a `nil` value.
35+ @cache_dir = options [ "--cache-dir" ] . presence #: String?
36+
3437 @parser = options [ "--parser" ] == "prism" ? :prism : :original #: Symbol
3538 end
3639
40+ #: String?
41+ attr_reader :cache_dir
42+
3743 #: Symbol
3844 attr_reader :parser
3945
@@ -47,6 +53,10 @@ def parse_with_prism? = @parser == :prism
4753
4854 #: (*String sorbet_args) -> Spoom::ExecResult
4955 def sorbet ( *sorbet_args )
56+ if sorbet_config . cache_dir
57+ sorbet_args << "--cache-dir=#{ sorbet_config . cache_dir } "
58+ end
59+
5060 if sorbet_config . parse_with_prism?
5161 sorbet_args << "--parser=prism"
5262 end
You can’t perform that action at this time.
0 commit comments