File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
lib/ruby_wasm/build_system/product Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,13 @@ def fetch
3535 case @params [ :type ]
3636 when "github"
3737 repo_url = "https://github.com/#{ @params [ :repo ] } .git"
38- system "git clone --depth 1 -b #{ @params [ :rev ] } #{ repo_url } #{ src_dir } " or
38+ FileUtils . mkdir_p src_dir
39+ system "git init" , chdir : src_dir
40+ system "git remote add origin #{ repo_url } " , chdir : src_dir
41+ system ( "git fetch --depth 1 origin #{ @params [ :rev ] } :#{ @params [ :rev ] } " , chdir : src_dir ) or
3942 raise "failed to clone #{ repo_url } "
43+ system ( "git checkout #{ @params [ :rev ] } " , chdir : src_dir ) or
44+ raise "failed to checkout #{ @params [ :rev ] } "
4045 when "local"
4146 FileUtils . mkdir_p File . dirname ( src_dir )
4247 FileUtils . cp_r @params [ :src ] , src_dir
You can’t perform that action at this time.
0 commit comments