swift - SwiftyMocky:ShellOut 遇到错误
问题描述
我在生成模拟时面临以下问题SwiftyMocky
╔════════════════════════╗
║ SwiftyMocky CLI v3.5.0 ║
╚════════════════════════╝
Running at: <path-to-project>SomeProject
Processing mock: SomeTests ...
❌ Error: ShellOut encountered an error
Status code: 1
Message: "Unknown Arguments: <path>/.mocky/.config.yml.tmp
Options:
--watch [default: false] - Watch template for changes and regenerate as needed.
--disableCache [default: false] - Stops using cache.
--verbose [default: false] - Turn on verbose logging
--quiet [default: false] - Turn off any logging, only emmit errors.
--prune [default: false] - Remove empty generated files
--sources - Path to a source swift files. File or Directory.
--exclude-sources - Path to a source swift files to exclude. File or Directory.
--templates - Path to templates. File or Directory.
--exclude-templates - Path to templates to exclude. File or Directory.
--output - Path to output. File or Directory. Default is current path.
--config - Path to config file. File or Directory. Default is current path.
--force-parse - File extensions that Sourcery will be forced to parse, even if they were generated by Sourcery.
--args - Custom values to pass to templates.
--ejsPath - Path to EJS file for JavaScript templates."
Output: ""
我已经尝试sourcery
将版本更新到 0.18.0 并卸载两者sourcery
并SwiftyMocky
重新安装。
任何帮助,将不胜感激。
更新SwiftyMocky doctor
日志
✗ SwiftyMocky doctor
╔════════════════════════╗
║ SwiftyMocky CLI v3.5.0 ║
╚════════════════════════╝
1. Inspecting tools dependencies:
✅ Mint available
✅ Sourcery is available through Mint
2. Inspecting Mockfile:
✅ Mockfile exists
✅ Mockfile contains mocks definitions
3. Linting 'ServicingTests' mock:
✅ Output file exists
Targets:
✅ Mock defines targets correctly
✅ All targets include
'./<project>/ServicingTests/ServicingTests.Mock.generated.swift' file.
Sources:
✅ Sources are defined correctly
Imports:
✅ Testable imports are defined
✅ Imports are defined
此外,我的一位同事能够生成模拟。他说当他运行SwiftyMocky generate
命令时它不会生成<path>/.mocky/.config.yml.tmp
.
唯一的区别是macOS
版本。我在跑10.15.4
,他在跑10.15.3
。
解决方案
我终于解决了这个问题,这是一件愚蠢的事情。我space
在项目路径中有一个。我所需要的只是space
从项目路径中删除它,它就像一个魅力。
推荐阅读
- javascript - 如何等待文件中的测试完成以使用 Jest 在另一个文件中开始测试?
- wordpress - 如果有自定义字段,则隐藏产品或变体
- python - 添加新行而不覆盖现有行
- reporting-services - SSRS 报告没有采用多个值,我可以知道如何解决这个问题吗,我正在使用雪花代码
- python-3.x - selenium.common.exceptions.ElementNotInteractableException:消息:元素不可交互使用 Selenium Python 将文本发送到名字字段
- java - 我的 Maven 插件在想法中总是有触摸选项
- java - 存储库中缺少 org.renjin.cran 库
- dialogflow-es - Google Dialogflow 自定义负载是否在 Telegram 中具有调用功能?
- javascript - API 端点在不等待承诺的情况下返回有什么缺点吗?
- html5-canvas - 如何调试 HTML5 canvas pixi.js 性能?