Skip to content

Commit 1f70237

Browse files
templates/15-gomod.sh: fix mkdir issues (#57)
Previously when a package uses gomod template multiple times, sub-packages built after the first one would fail because $SRCDIR/abbuild exists. This patch fixes mkdir errors by adding -p option to mkdir, avoiding re- creation of subdirs and returning errors when $SRCDIR/abbuild has already been created by previous builds.
1 parent 2528a64 commit 1f70237

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/15-gomod.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ build_gomod_configure() {
2727
abdie "ABSHADOW must be set to true for this build type: $?."
2828
fi
2929

30-
mkdir "$BLDDIR" \
30+
mkdir -pv "$BLDDIR" \
3131
|| abdie "Failed to create $SRCDIR/abbuild: $?."
3232
cd "$BLDDIR" \
3333
|| abdie "Failed to cd $SRCDIR/abbuild: $?."

0 commit comments

Comments
 (0)