throw an error on windows builds with no target specified
Этот коммит содержится в:
родитель
90b42799a2
коммит
4be9802d26
1 изменённых файлов: 6 добавлений и 0 удалений
|
@ -230,7 +230,13 @@ func LoadTarget(target string) (*TargetSpec, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WindowsBuildNotSupportedErr is being thrown, when goos is windows and no target has been specified.
|
||||||
|
var WindowsBuildNotSupportedErr = errors.New("Building Windows binaries is currently not supported. Try specifying a different target")
|
||||||
|
|
||||||
func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
|
func defaultTarget(goos, goarch, triple string) (*TargetSpec, error) {
|
||||||
|
if goos == "windows" {
|
||||||
|
return nil, WindowsBuildNotSupportedErr
|
||||||
|
}
|
||||||
// No target spec available. Use the default one, useful on most systems
|
// No target spec available. Use the default one, useful on most systems
|
||||||
// with a regular OS.
|
// with a regular OS.
|
||||||
spec := TargetSpec{
|
spec := TargetSpec{
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче