fix: make installer gate portable in root CI
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tallynote",
|
"name": "tallynote",
|
||||||
"version": "1.1.15",
|
"version": "1.1.16",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@9.0.6",
|
"packageManager": "pnpm@9.0.6",
|
||||||
|
|||||||
@@ -88,6 +88,12 @@ bash -c '
|
|||||||
chmod 700 "$mode_dir"
|
chmod 700 "$mode_dir"
|
||||||
[[ "$(stat_mode_bits "$mode_dir")" == 448 ]]
|
[[ "$(stat_mode_bits "$mode_dir")" == 448 ]]
|
||||||
mkdir -p "$owner_parent"
|
mkdir -p "$owner_parent"
|
||||||
|
# CI runs this shell suite as root. Make the parent genuinely non-root in
|
||||||
|
# that environment so the assertion exercises the ownership guard instead
|
||||||
|
# of accidentally passing because root-owned parents are allowed.
|
||||||
|
if [[ "${EUID:-$(id -u)}" == 0 ]]; then
|
||||||
|
chown 65534:65534 "$owner_parent"
|
||||||
|
fi
|
||||||
if (assert_path_chain "$owner_parent/child") >/dev/null 2>&1; then
|
if (assert_path_chain "$owner_parent/child") >/dev/null 2>&1; then
|
||||||
echo "expected non-root path parent to fail" >&2
|
echo "expected non-root path parent to fail" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user