Browse Source

Merge pull request #47121 from voloder/master

Make sure that make doesn't rm -rf the system out of existence
Sebastiaan van Stijn 1 year ago
parent
commit
2da96d6c12
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Makefile

+ 3 - 0
Makefile

@@ -250,6 +250,9 @@ swagger-docs: ## preview the API documentation
 .PHONY: generate-files
 generate-files:
 	$(eval $@_TMP_OUT := $(shell mktemp -d -t moby-output.XXXXXXXXXX))
+	ifeq ($($@_TMP_OUT),)
+		$(error Could not create temp directory.)
+	endif
 	$(BUILD_CMD) --target "update" \
 		--output "type=local,dest=$($@_TMP_OUT)" \
 		--file "./hack/dockerfiles/generate-files.Dockerfile" .