Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): 修复 taro init 自定义模板源时未正确解析zip包的问题 #14041

Merged
merged 5 commits into from
Jul 3, 2023

Conversation

AdvancedCat
Copy link
Member

这个 PR 做了什么? (简要描述所做更改)

执行 taro init 创建项目时,选择自定义模板源,无论使用「单模板」或「模板组」的 url 模板源(.zip文件),均无法正确执行初始化命令。
原因是,taro 将 zip 包直接解包至 taro-temp 临时文件夹中,导致执行 readDirWithFileTypes 方法获取文件夹名称时错误,误认为zip包结构不正确,从而异常。

本 PR 经修复后,结果如下:
单模板
image
单模板时,给出 from-remote-url 的临时选项名称,辅助用户选择

模板组
image

以上 zip 包均为直接从 git 仓库中下载的 .zip 文件

这个 PR 是什么类型? (至少选择一个)

这个 PR 涉及以下平台:

  • 所有小程序
  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 字节跳动小程序
  • QQ 轻应用
  • 京东小程序
  • 快应用平台(QuickApp)
  • Web 平台(H5)
  • 移动端(React-Native)
  • 鸿蒙(harmony)

@Chen-jj Chen-jj merged commit 2b484a1 into NervJS:next Jul 3, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

【taro init】使用 url 模板源时,未正确解析zip包
2 participants