Skip to content

Commit 9b6d49c

Browse files
build: Fix clean checkout with pretty build log mode
`BuildExecutor#system` should not return anything, but it raises an exception when the command fails. So, we should not use handle command failure in caller side.
1 parent 2371b7f commit 9b6d49c

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lib/ruby_wasm/build.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ def system(*args, chdir: nil, env: nil)
7474
printer.done
7575
end
7676
end
77+
return
7778
rescue => e
7879
$stdout.flush
7980
$stderr.puts "Try running with `rake --verbose` for more complete output."

lib/ruby_wasm/build/product/ruby_source.rb

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ def fetch(executor)
5151
"origin",
5252
"#{@params[:rev]}:origin/#{@params[:rev]}",
5353
chdir: src_dir
54-
) or raise "failed to clone #{repo_url}"
54+
)
5555
executor.system(
5656
"git",
5757
"checkout",
5858
"origin/#{@params[:rev]}",
5959
chdir: src_dir
60-
) or raise "failed to checkout #{@params[:rev]}"
60+
)
6161
when "local"
6262
executor.mkdir_p File.dirname(src_dir)
6363
executor.cp_r @params[:src], src_dir
@@ -80,10 +80,8 @@ def build(executor)
8080
"gnu",
8181
"config.guess",
8282
"config.sub",
83-
chdir: src_dir or
84-
raise "failed to download config.guess and config.sub"
85-
executor.system "./autogen.sh", chdir: src_dir or
86-
raise "failed to run autogen.sh"
83+
chdir: src_dir
84+
executor.system "./autogen.sh", chdir: src_dir
8785
end
8886
end
8987
end

0 commit comments

Comments
 (0)