ENV/shared: widen type
This commit is contained in:
parent
3fc8c703f2
commit
1b6fb8f460
@ -103,7 +103,7 @@ module SharedEnvExtension
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { params(key: String, path: String).void }
|
sig { params(key: String, path: T.any(String, Pathname)).void }
|
||||||
def append_path(key, path)
|
def append_path(key, path)
|
||||||
self[key] = PATH.new(self[key]).append(path)
|
self[key] = PATH.new(self[key]).append(path)
|
||||||
end
|
end
|
||||||
@ -115,7 +115,7 @@ module SharedEnvExtension
|
|||||||
# Prepending a system path such as /usr/bin is a no-op so that requirements
|
# Prepending a system path such as /usr/bin is a no-op so that requirements
|
||||||
# don't accidentally override superenv shims or formulae's `bin` directories.
|
# don't accidentally override superenv shims or formulae's `bin` directories.
|
||||||
# <pre>ENV.prepend_path "PATH", which("emacs").dirname</pre>
|
# <pre>ENV.prepend_path "PATH", which("emacs").dirname</pre>
|
||||||
sig { params(key: String, path: String).void }
|
sig { params(key: String, path: T.any(String, Pathname)).void }
|
||||||
def prepend_path(key, path)
|
def prepend_path(key, path)
|
||||||
return if %w[/usr/bin /bin /usr/sbin /sbin].include? path.to_s
|
return if %w[/usr/bin /bin /usr/sbin /sbin].include? path.to_s
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user