#!/usr/bin/env ruby
puts system('git version')
puts `git version`
puts exec('git version')
输出:
git version 2.24.3 (Apple Git-128)
true
git version 2.24.3 (Apple Git-128)
git version 2.24.3 (Apple Git-128)
#!/usr/bin/env ruby
puts system('git version')
puts `git version`
puts exec('git version')
输出:
git version 2.24.3 (Apple Git-128)
true
git version 2.24.3 (Apple Git-128)
git version 2.24.3 (Apple Git-128)
本文标题:ruby脚本中执行git命令
本文链接:https://www.haomeiwen.com/subject/jeaxgltx.html
网友评论