Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Fix doom emacs upgrading (fix #961) #964

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
11 changes: 5 additions & 6 deletions src/steps/emacs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,25 +67,24 @@ impl Emacs {
print_separator("Doom Emacs");

let mut command = ctx.run_type().execute(doom);
command.args(&["-y", "upgrade"]);

if ctx.config().yes(Step::Emacs) {
command.arg("--force");
}

command.args(&["upgrade"]);

command.check_run()
}

pub fn upgrade(&self, ctx: &ExecutionContext) -> Result<()> {
let emacs = require("emacs")?;
if let Some(doom) = &self.doom {
Emacs::update_doom(doom, ctx)?;
}
let init_file = require_option(self.directory.as_ref(), String::from("Emacs directory does not exist"))?
.join("init.el")
.require()?;

if let Some(doom) = &self.doom {
return Emacs::update_doom(doom, ctx);
}

print_separator("Emacs");

let mut command = ctx.run_type().execute(&emacs);
Expand Down