有人熟悉 etcd 項(xiàng)目嗎?或者我們在談?wù)撨@個問題時最好忘記這個項(xiàng)目。問題是$ buildln: `gopath/src/github.com/coreos/etcd': cannot overwrite directory當(dāng) exec構(gòu)建外殼和內(nèi)容是:#!/bin/sh -eif [ ! -h gopath/src/github.com/coreos/etcd ]; then mkdir -p gopath/src/github.com/coreos/ ln -s ../../../.. gopath/src/github.com/coreos/etcdfiexport GOBIN=${PWD}/binexport GOPATH=${PWD}/gopathexport GOFMTPATH="./bench ./config ./discovery ./etcd ./error ./http ./log main.go ./metrics ./mod ./server ./store ./tests"# Don't surprise user by formatting their codes by stealthif [ "--fmt" = "$1" ]; then gofmt -s -w -l $GOFMTPATHfigo install github.com/coreos/etcdgo install github.com/coreos/etcd/bench一些補(bǔ)充:我的系統(tǒng)是 Windows 7我在 git bash 上運(yùn)行 shell。 問題重現(xiàn):step1: open the git bashstep2: git clone git@github.com:coreos/etcd.gitstep3: cd etcdstep4: build
3 回答

躍然一笑
TA貢獻(xiàn)1826條經(jīng)驗(yàn) 獲得超6個贊
如“ Git Bash Shell 無法創(chuàng)建符號鏈接”中所述(因?yàn)槟?Windows 7 上的 git bash 中使用該腳本)
在
ln
與msysGit運(yùn)只是試圖復(fù)制它的參數(shù),而不是鏈接小提琴。這是因?yàn)殒溄又辉冢撤N程度上)在 NTFS 文件系統(tǒng)上工作,并且 MSYS 團(tuán)隊(duì)不想重新實(shí)現(xiàn) ln。解決方法是
mklink
從 Bash運(yùn)行。
這也允許您創(chuàng)建Symlink 或 Junction。
因此,默認(rèn)情況下,'ln' 在 Windows 版 Git 隨附的舊 shell 中不會按預(yù)期工作。
- 3 回答
- 0 關(guān)注
- 294 瀏覽
添加回答
舉報(bào)
0/150
提交
取消