fix: repair CI failures from stale lockfile and Chrome sandbox on GHA runners (#771)
Regenerate pnpm-lock.yaml to match the cleaned-up package.json (only @changesets/cli remains). Add CI environment detection to should_disable_sandbox() so Chrome launches with --no-sandbox on GitHub Actions runners where AppArmor blocks unprivileged user namespaces.
This commit is contained in:
@@ -468,12 +468,18 @@ fn get_chrome_user_data_dirs() -> Vec<PathBuf> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Returns true if Chrome's sandbox should be disabled because the environment
|
/// Returns true if Chrome's sandbox should be disabled because the environment
|
||||||
/// doesn't support it (containers, VMs, running as root).
|
/// doesn't support it (containers, VMs, CI runners, running as root).
|
||||||
fn should_disable_sandbox(existing_args: &[String]) -> bool {
|
fn should_disable_sandbox(existing_args: &[String]) -> bool {
|
||||||
if existing_args.iter().any(|a| a == "--no-sandbox") {
|
if existing_args.iter().any(|a| a == "--no-sandbox") {
|
||||||
return false; // already set by user
|
return false; // already set by user
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CI environments (GitHub Actions, GitLab CI, etc.) often lack user namespace
|
||||||
|
// support due to AppArmor or kernel restrictions.
|
||||||
|
if std::env::var("CI").is_ok() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
{
|
{
|
||||||
// Root user -- standard container default, Chrome sandbox requires non-root
|
// Root user -- standard container default, Chrome sandbox requires non-root
|
||||||
|
|||||||
Generated
+2
-3238
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user