Signed-off-by: John Howard <jhoward@microsoft.com>
| ... | ... |
@@ -29,11 +29,22 @@ export MAKEDIR="$SCRIPTDIR/make" |
| 29 | 29 |
|
| 30 | 30 |
# We're a nice, sexy, little shell script, and people might try to run us; |
| 31 | 31 |
# but really, they shouldn't. We want to be in a container! |
| 32 |
-if [ "$PWD" != "/go/src/$DOCKER_PKG" ] || [ -z "$DOCKER_CROSSPLATFORMS" ]; then |
|
| 32 |
+inContainer="AssumeSoInitially" |
|
| 33 |
+if [ "$(go env GOHOSTOS)" = 'windows' ]; then |
|
| 34 |
+ if [ -n "$FROM_DOCKERFILE" ]; then |
|
| 35 |
+ unset inContainer |
|
| 36 |
+ fi |
|
| 37 |
+else |
|
| 38 |
+ if [ "$PWD" != "/go/src/$DOCKER_PKG" ] || [ -z "$DOCKER_CROSSPLATFORMS" ]; then |
|
| 39 |
+ unset inContainer |
|
| 40 |
+ fi |
|
| 41 |
+fi |
|
| 42 |
+ |
|
| 43 |
+if [ -n "$inContainer" ]; then |
|
| 33 | 44 |
{
|
| 34 |
- echo "# WARNING! I don't seem to be running in the Docker container." |
|
| 45 |
+ echo "# WARNING! I don't seem to be running in a Docker container." |
|
| 35 | 46 |
echo "# The result of this command might be an incorrect build, and will not be" |
| 36 |
- echo "# officially supported." |
|
| 47 |
+ echo "# officially supported." |
|
| 37 | 48 |
echo "#" |
| 38 | 49 |
echo "# Try this instead: make all" |
| 39 | 50 |
echo "#" |