Skip to content

Commit 26b798a

Browse files
build: fix need_fetch_cli check in wasi-vfs
1 parent f4daacf commit 26b798a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/ruby_wasm/build/product/wasi_vfs.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ class WasiVfsProduct < BuildProduct
77
def initialize(build_dir)
88
@build_dir = build_dir
99
@need_fetch_lib = ENV["LIB_WASI_VFS_A"].nil?
10+
installed_cli_path =
11+
ENV["WASI_VFS_CLI"] || Toolchain.find_path("wasi-vfs")
12+
@need_fetch_cli = installed_cli_path.nil?
1013
@cli_path =
11-
ENV["WASI_VFS_CLI"] || Toolchain.find_path("wasi-vfs") ||
12-
File.join(cli_product_build_dir, "wasi-vfs")
13-
@need_fetch_cli = @cli_path.nil?
14+
installed_cli_path || File.join(cli_product_build_dir, "wasi-vfs")
1415
end
1516

1617
def lib_product_build_dir

0 commit comments

Comments
 (0)