Authored-by: Rotem Yaari <vmalloc@gmail.com> Approved-by: Thomas Schönauer <t.schoenauer@hgs-wt.at>
This commit is contained in:
@@ -67,25 +67,24 @@ impl Emacs {
|
|||||||
print_separator("Doom Emacs");
|
print_separator("Doom Emacs");
|
||||||
|
|
||||||
let mut command = ctx.run_type().execute(doom);
|
let mut command = ctx.run_type().execute(doom);
|
||||||
command.args(&["-y", "upgrade"]);
|
|
||||||
|
|
||||||
if ctx.config().yes(Step::Emacs) {
|
if ctx.config().yes(Step::Emacs) {
|
||||||
command.arg("--force");
|
command.arg("--force");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
command.args(&["upgrade"]);
|
||||||
|
|
||||||
command.check_run()
|
command.check_run()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn upgrade(&self, ctx: &ExecutionContext) -> Result<()> {
|
pub fn upgrade(&self, ctx: &ExecutionContext) -> Result<()> {
|
||||||
let emacs = require("emacs")?;
|
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"))?
|
let init_file = require_option(self.directory.as_ref(), String::from("Emacs directory does not exist"))?
|
||||||
.join("init.el")
|
.join("init.el")
|
||||||
.require()?;
|
.require()?;
|
||||||
|
|
||||||
if let Some(doom) = &self.doom {
|
|
||||||
return Emacs::update_doom(doom, ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
print_separator("Emacs");
|
print_separator("Emacs");
|
||||||
|
|
||||||
let mut command = ctx.run_type().execute(&emacs);
|
let mut command = ctx.run_type().execute(&emacs);
|
||||||
|
|||||||
Reference in New Issue
Block a user