理解を深めるために言い換えました。
私は git フロー ベースのプラグインをカスタマイズしており、init の末尾を取得してレポを作成しようとしています。手動で行うコマンドはすべて知っていますが、そのため自動化できません。
REPO_NAME= `${PWD##*/}`
echo $REPO_NAME
ORG=':org_name'
curl -u 'user:pass' \
-d '{ "name": "'$REPO_NAME'", "private": "true", "has_issues": "true", "has_wiki": "false", "has_downloads": "true"}' -i "https://api.github.com/orgs/$ORG/repos"
そして、コマンドに対して何をしても、常にこれが発生し、カールは失敗します。
/usr/local/bin/git-hf: 1: /usr/local/bin/git-hf: test-testy: not found
errors": [
{
"code": "custom",
"field": "name",
"resource": "Repository",
"message": "name is too short (minimum is 1 characters)"
}
], "メッセージ": "検証に失敗しました"
これはおそらくばかげた質問であることはわかっていますが、当面の解決策よりも、ここでのロジックのエラーに関心があります。