diff --git a/ci/release/template/scripts/lib.sh b/ci/release/template/scripts/lib.sh index 3ebcfdb71..ff78d5171 100644 --- a/ci/release/template/scripts/lib.sh +++ b/ci/release/template/scripts/lib.sh @@ -417,8 +417,9 @@ manpath() { } is_writable_dir() { - # If it can be created, we can use it. - hide mkdir -p "$1" + mkdir -p "$1" 2>/dev/null + # directory must exist otherwise -w returns 1 even for paths that should be writable. + [ -w "$1" ] } ensure_prefix() { diff --git a/ci/sub b/ci/sub index c8ad46ee4..4beb5c09e 160000 --- a/ci/sub +++ b/ci/sub @@ -1 +1 @@ -Subproject commit c8ad46ee4ee10872b7d509ad6381922ee69bd5c0 +Subproject commit 4beb5c09e5e3380641ee7e3b0c1d4f6358cca544 diff --git a/install.sh b/install.sh index ede6c0141..a00d34e34 100755 --- a/install.sh +++ b/install.sh @@ -553,8 +553,9 @@ manpath() { } is_writable_dir() { - # If it can be created, we can use it. - hide mkdir -p "$1" + mkdir -p "$1" 2>/dev/null + # directory must exist otherwise -w returns 1 even for paths that should be writable. + [ -w "$1" ] } ensure_prefix() {