【文件属性】:
文件名称:ProcessRunner:从Swift执行子进程和系统命令
文件大小:177KB
文件格式:ZIP
更新时间:2021-05-27 16:43:47
shell swift cli package system
ProcessRunner
通过Swift脚本或命令行工具轻松执行系统命令。
特征
:check_mark_button: 使用参数轻松执行子进程
:check_mark_button: 使用参数轻松执行shell命令
:check_mark_button: 实时捕获输出或流到stdout / stderr
:check_mark_button: 兼容Swift Package Manager
:check_mark_button: 兼容Linux :penguin:
:rocket: 从Swift脚本和CLI工具执行子进程
使用Process在Swift中运行子进程并不困难,但可能会有些乏味且重复。
System使这项任务极为容易。 如果您熟悉Ruby脚本(Rakefile,Fastlane,Danger等),您将感到宾至如归。
:laptop: 自动将输出重定向到标准输出
import ProcessRunner
try system ( command : " echo hello world " ) // prints "hello world" to