Skip to content

Commit 30ff735

Browse files
build: Fix local source build
1 parent b622f12 commit 30ff735

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/ruby_wasm/build/product/ruby_source.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def cache_key(digest)
1919
when "tarball"
2020
digest << @params[:url]
2121
when "local"
22-
digest << File.mtime(@params[:src]).to_i.to_s
22+
digest << File.mtime(@params[:path]).to_i.to_s
2323
else
2424
raise "unknown source type: #{@params[:type]}"
2525
end
@@ -75,7 +75,7 @@ def fetch(executor)
7575
)
7676
when "local"
7777
executor.mkdir_p File.dirname(src_dir)
78-
executor.cp_r @params[:src], src_dir
78+
executor.cp_r @params[:path], src_dir
7979
else
8080
raise "unknown source type: #{@params[:type]}"
8181
end

lib/ruby_wasm/cli.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ def compute_build_source(options)
187187
if options[:patches]
188188
RubyWasm.logger.warn "Patches specified through --patch are ignored for local sources"
189189
end
190-
return { type: "local", path: src_name }
190+
# @type var local_source: RubyWasm::Packager::build_source_local
191+
local_source = { type: "local", path: src_name }
192+
# @type var local_source: RubyWasm::Packager::build_source
193+
local_source = local_source.merge(name: "local", patches: [])
194+
return local_source
191195
end
192196
# Otherwise, it's an unknown source.
193197
raise(

0 commit comments

Comments
 (0)