【发布时间】:2015-01-02 03:57:18
【问题描述】:
在运行 postinstall 到 npm install 的 bash 脚本中,我想获取名为 base 的特定 repo 的 Github 远程 URL。但是,当它运行时,提取的值是“git”,而不是我的 git 存储库的 URL。您将如何捕获从该命令返回的 URL?
#!/bin/bash
...
remoteBackup=git config --get remote.base.url
...
【问题讨论】: