From 6d0e1a2e73db00aef6b686fb17e6f3fa3e48f71c Mon Sep 17 00:00:00 2001
From: Darko Poljak <darko.poljak@gmail.com>
Date: Thu, 28 Sep 2017 21:47:20 +0200
Subject: [PATCH] --tmpdir -> TMPDIR env var

---
 cdist/conf/type/__staged_file/gencode-local | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cdist/conf/type/__staged_file/gencode-local b/cdist/conf/type/__staged_file/gencode-local
index 851970e8..255f30ed 100755
--- a/cdist/conf/type/__staged_file/gencode-local
+++ b/cdist/conf/type/__staged_file/gencode-local
@@ -61,7 +61,7 @@ fetch_file() {
 }
 
 fetch_and_prepare_file() {
-   printf 'tmpdir="$(mktemp -d --tmpdir="/tmp" "%s")"\n' "${__type##*/}.XXXXXXXXXX"
+   printf 'tmpdir="$(TMPDIR="/tmp" mktemp -d "%s")"\n' "${__type##*/}.XXXXXXXXXX"
    printf 'cd "$tmpdir"\n'
    printf "$fetch_command > \"%s\"\n" "$source" "$source_file_name"
    prepare_command="$(cat "$__object/parameter/prepare-command")"