Skip to content

Commit 3c31744

Browse files
build: Split command arguments at Ruby level take 2
1 parent 310be8d commit 3c31744

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

lib/ruby_wasm/build/product/crossruby.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,20 @@ def do_extconf(executor, crossruby)
5353
"--disable=gems",
5454
# HACK: top_srcdir is required to find ruby headers
5555
"-e",
56-
%Q('$top_srcdir="#{source.src_dir}"'),
56+
%Q($top_srcdir="#{source.src_dir}"),
5757
# HACK: extout is required to find config.h
5858
"-e",
59-
%Q('$extout="#{crossruby.build_dir}/.ext"'),
59+
%Q($extout="#{crossruby.build_dir}/.ext"),
6060
# HACK: force static ext build by imitating extmk
6161
"-e",
62-
"'$static = true; trace_var(:$static) {|v| $static = true }'",
62+
"$static = true; trace_var(:$static) {|v| $static = true }",
6363
# HACK: $0 should be extconf.rb path due to mkmf source file detection
6464
# and we want to insert some hacks before it. But -e and $0 cannot be
6565
# used together, so we rewrite $0 in -e.
6666
"-e",
67-
%Q('$0="#{@srcdir}/extconf.rb"'),
67+
%Q($0="#{@srcdir}/extconf.rb"),
6868
"-e",
69-
%Q('require_relative "#{@srcdir}/extconf.rb"'),
69+
%Q(require_relative "#{@srcdir}/extconf.rb"),
7070
"-I#{crossruby.build_dir}"
7171
]
7272
# Clear RUBYOPT to avoid loading unrelated bundle setup

lib/ruby_wasm/build/product/wasi_vfs.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def build(executor)
4848
lib_wasi_vfs_url =
4949
"https://github.com/kateinoigakukun/wasi-vfs/releases/download/v#{WASI_VFS_VERSION}/libwasi_vfs-wasm32-unknown-unknown.zip"
5050
Dir.mktmpdir do |tmpdir|
51-
executor.system "curl -L #{lib_wasi_vfs_url} -o #{tmpdir}/libwasi_vfs.zip"
52-
executor.system "unzip #{tmpdir}/libwasi_vfs.zip -d #{tmpdir}"
51+
executor.system "curl", "-L", lib_wasi_vfs_url, "-o", "#{tmpdir}/libwasi_vfs.zip"
52+
executor.system "unzip", "#{tmpdir}/libwasi_vfs.zip", "-d", tmpdir
5353
executor.mkdir_p File.dirname(lib_wasi_vfs_a)
5454
executor.mv File.join(tmpdir, "libwasi_vfs.a"), lib_wasi_vfs_a
5555
end
@@ -59,8 +59,8 @@ def install_cli
5959
return if !@need_fetch_cli || File.exist?(cli_bin_path)
6060
FileUtils.mkdir_p cli_product_build_dir
6161
zipfile = File.join(cli_product_build_dir, "wasi-vfs-cli.zip")
62-
system "curl -L -o #{zipfile} #{self.cli_download_url}"
63-
system "unzip #{zipfile} -d #{cli_product_build_dir}"
62+
system "curl", "-L", "-o", zipfile, self.cli_download_url
63+
system "unzip", zipfile, "-d", cli_product_build_dir
6464
end
6565

6666
def cli_download_url

0 commit comments

Comments
 (0)