-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cure APFS/Fstabs on Mac #246
Conversation
I need to do some thorough testing on this. |
Doing this has made me want a |
I'll rebase this on top #296 once it merges and it should be r4r |
@@ -32,7 +32,7 @@ impl BootstrapLaunchctlService { | |||
let mut command = Command::new("launchctl"); | |||
command.process_group(0); | |||
command.arg("print"); | |||
command.arg(format!("{domain}/{service}")); | |||
command.arg("{domain}/{service}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.....this seems wrong. Am I wrong?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YOu're right, oh my goodness. Wait, how did the tests pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a great question.
We should probably make a Command
wrapper that will automatically trace the commands being run locally, so we could see if this appeared in the logs...
But I think that's because the command spawned properly (so the .map_err
into ActionError::command(...)
never happened), but that it was just an error -- and in that case all we do is mark it uncompleted. The lack of a format!
would have just made this unconditionally false (and thus always uncompleted).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have this -- however it also gobbles some errors we don't necessarily want it to (such as in this case):
Lines 94 to 104 in f9ab680
async fn execute_command(command: &mut Command) -> Result<Output, ActionError> { | |
tracing::trace!("Executing `{:?}`", command.as_std()); | |
let output = command | |
.output() | |
.await | |
.map_err(|e| ActionError::command(command, e))?; | |
match output.status.success() { | |
true => Ok(output), | |
false => Err(ActionError::command_output(command, output)), | |
} | |
} |
@cole-h If you could help me know which
|
..........embarrassing. I was looking at an old commit. You saw nothing. |
Description
Create the
CreateFstabEntry
action how to accept a plannedCreateApfsVolume
and, using that, decide if it should skip updating the fstab.Teaches
CreateFstabEntry
to recognize and edit existing/nix
based fstab entries to correct them.Checklist
cargo fmt
nix build
nix flake check
Validating with
install.determinate.systems
If a maintainer has added the
upload to s3
label to this PR, it will become available for installation viainstall.determinate.systems
: