update system wide config

This commit is contained in:
Robin Appelman 2025-10-26 17:19:19 +01:00
commit 0ea278e511
3 changed files with 41 additions and 8 deletions

24
dist/main/index.js vendored
View file

@ -4313,20 +4313,36 @@ function setup() {
core.endGroup(); core.endGroup();
// for managed signing key and private caches // for managed signing key and private caches
if (authToken !== "") { if (authToken !== "") {
yield exec.exec('attic', ['login', name, instance, authToken]); yield exec.exec('attic', ['login', name, instance, authToken], {
env: {
XDG_CONFIG_HOME: "/etc",
}
});
} }
else { else {
yield exec.exec('attic', ['login', name, instance]); yield exec.exec('attic', ['login', name, instance], {
env: {
XDG_CONFIG_HOME: "/etc",
}
});
} }
core.startGroup(`Attic: using cache ` + name); core.startGroup(`Attic: using cache ` + name);
yield exec.exec('attic', ['use', name]); yield exec.exec('attic', ['use', name], {
env: {
XDG_CONFIG_HOME: "/etc",
}
});
core.endGroup(); core.endGroup();
if (extraPullNames != "") { if (extraPullNames != "") {
core.startGroup(`Attic: using extra caches ` + extraPullNames); core.startGroup(`Attic: using extra caches ` + extraPullNames);
const extraPullNameList = extraPullNames.split(','); const extraPullNameList = extraPullNames.split(',');
for (let itemName of extraPullNameList) { for (let itemName of extraPullNameList) {
const trimmedItemName = itemName.trim(); const trimmedItemName = itemName.trim();
yield exec.exec('attic', ['use', trimmedItemName]); yield exec.exec('attic', ['use', trimmedItemName], {
env: {
XDG_CONFIG_HOME: "/etc",
}
});
} }
core.endGroup(); core.endGroup();
} }

View file

@ -11,4 +11,5 @@ if [[ $pathsToPush == "" ]]; then
fi fi
fi fi
export XDG_CONFIG_HOME=/etc
echo "$pathsToPush" | xargs "$attic" push $atticArgs "$cache" echo "$pathsToPush" | xargs "$attic" push $atticArgs "$cache"

View file

@ -31,13 +31,25 @@ async function setup() {
// for managed signing key and private caches // for managed signing key and private caches
if (authToken !== "") { if (authToken !== "") {
await exec.exec('attic', ['login', name, instance, authToken]); await exec.exec('attic', ['login', name, instance, authToken], {
env: {
XDG_CONFIG_HOME: "/etc",
}
});
} else { } else {
await exec.exec('attic', ['login', name, instance]); await exec.exec('attic', ['login', name, instance], {
env: {
XDG_CONFIG_HOME: "/etc",
}
});
} }
core.startGroup(`Attic: using cache ` + name); core.startGroup(`Attic: using cache ` + name);
await exec.exec('attic', ['use', name]); await exec.exec('attic', ['use', name], {
env: {
XDG_CONFIG_HOME: "/etc",
}
});
core.endGroup(); core.endGroup();
if (extraPullNames != "") { if (extraPullNames != "") {
@ -45,7 +57,11 @@ async function setup() {
const extraPullNameList = extraPullNames.split(','); const extraPullNameList = extraPullNames.split(',');
for (let itemName of extraPullNameList) { for (let itemName of extraPullNameList) {
const trimmedItemName = itemName.trim(); const trimmedItemName = itemName.trim();
await exec.exec('attic', ['use', trimmedItemName]); await exec.exec('attic', ['use', trimmedItemName], {
env: {
XDG_CONFIG_HOME: "/etc",
}
});
} }
core.endGroup(); core.endGroup();
} }