Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/docker/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ pub(crate) fn run(
// terminate or it may be a known interrupt return status (130, 137, 143).
// simpler: just test if the program termination handler was called.
// SAFETY: an atomic load.
let is_terminated = unsafe { crate::errors::TERMINATED.load(Ordering::SeqCst) };
let is_terminated = crate::errors::TERMINATED.load(Ordering::SeqCst);
if !is_terminated {
ChildContainer::exit_static();
}
Expand Down
2 changes: 2 additions & 0 deletions src/docker/shared.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(static_mut_refs)] // FIXME: Use correct types for CHILD_CONTAINER

use super::custom::{Dockerfile, PreBuild};
use super::image::PossibleImage;
use super::Image;
Expand Down Expand Up @@ -1752,7 +1754,7 @@
}

#[test]
#[cfg_attr(cross_sandboxed, ignore)]

Check warning on line 1757 in src/docker/shared.rs

View workflow job for this annotation

GitHub Actions / docker-in-docker

unexpected `cfg` condition name: `cross_sandboxed`
fn test_host() -> Result<()> {
let vars = unset_env();
let mount_finder = MountFinder::new(vec![]);
Expand Down
3 changes: 2 additions & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub use color_eyre::Section;
pub use eyre::Context;
pub use eyre::Result;

pub static mut TERMINATED: AtomicBool = AtomicBool::new(false);
pub static TERMINATED: AtomicBool = AtomicBool::new(false);

pub fn install_panic_hook() -> Result<()> {
let is_dev = !crate::commit_info().is_empty() || std::env::var("CROSS_DEBUG").is_ok();
Expand Down Expand Up @@ -102,6 +102,7 @@ unsafe fn termination_handler() {
// however, we'd need to store the engine path and the argument list as
// a global CString and `Vec<CString>`, respectively. this atomic guard
// makes this safe regardless.
#[allow(static_mut_refs)] // FIXME: Use correct types for CHILD_CONTAINER
docker::CHILD_CONTAINER.terminate();

// all termination exit codes are 128 + signal code. the exit code is
Expand Down
2 changes: 2 additions & 0 deletions src/temp.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(static_mut_refs)] // FIXME: use appropriate std types for `FILES` and `DIRS`.

use std::fs;
use std::path::{Path, PathBuf};

Expand Down
Loading