From 8de7fcaf7e9b0c6e99ddd09021e8a746a68a8e63 Mon Sep 17 00:00:00 2001 From: John Howard Date: Fri, 11 Sep 2015 09:40:23 -0700 Subject: [PATCH] Windows: Nice error on stopsignal Signed-off-by: John Howard --- builder/dispatchers.go | 3 +++ builder/evaluator.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/builder/dispatchers.go b/builder/dispatchers.go index b00001260f..a1bf0862b7 100644 --- a/builder/dispatchers.go +++ b/builder/dispatchers.go @@ -540,6 +540,9 @@ func volume(b *builder, args []string, attributes map[string]bool, original stri // // Set the signal that will be used to kill the container. func stopSignal(b *builder, args []string, attributes map[string]bool, original string) error { + if runtime.GOOS == "windows" { + return fmt.Errorf("STOPSIGNAL is not supported on Windows") + } if len(args) != 1 { return fmt.Errorf("STOPSIGNAL requires exactly one argument") } diff --git a/builder/evaluator.go b/builder/evaluator.go index 18d2c36a63..1cf7bb727e 100644 --- a/builder/evaluator.go +++ b/builder/evaluator.go @@ -367,7 +367,7 @@ func platformSupports(command string) error { return nil } switch command { - case "expose", "volume", "user": + case "expose", "volume", "user", "stopsignal": return fmt.Errorf("The daemon on this platform does not support the command '%s'", command) } return nil