Skip to content

Commit

Permalink
Support env hash to FileUtils#sh in rake
Browse files Browse the repository at this point in the history
  • Loading branch information
sue445 committed Jan 9, 2025
1 parent fb8c66b commit e4708d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gems/rake/13.0/_test/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@ def create_task
puts "#{name}=#{value}"
end
end

task :test_with_sh do
sh "ruby test/unittest_without_env.rb"

env = { "RACK_ENV" => "test" }
sh env, "ruby test/unittest_with_env.rb"
end
end
end
1 change: 1 addition & 0 deletions gems/rake/13.0/rake.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ end

module FileUtils
def sh: (*String cmd, **untyped options) ?{ (bool, Process::Status) -> void } -> void
| (Hash[String, String] env, *String cmd, **untyped options) ?{ (bool, Process::Status) -> void } -> void
def ruby: (*String args, **untyped options) ?{ (bool, Process::Status) -> void } -> void
def safe_ln: (*untyped args, **untyped options) -> void
def split_all: (String path) -> Array[String]
Expand Down

0 comments on commit e4708d8

Please sign in to comment.