committed by
GitHub
parent
0cfae3d5eb
commit
e3d2d11e8a
@@ -35,7 +35,7 @@ fn nvimrc(base_dirs: &BaseDirs) -> Option<PathBuf> {
|
||||
|
||||
fn upgrade(vim: &PathBuf, vimrc: &PathBuf, ctx: &ExecutionContext) -> Result<()> {
|
||||
let mut tempfile = tempfile::NamedTempFile::new()?;
|
||||
tempfile.write_all(UPGRADE_VIM.as_bytes())?;
|
||||
tempfile.write_all(UPGRADE_VIM.replace('\r', "").as_bytes())?;
|
||||
debug!("Wrote vim script to {:?}", tempfile.path());
|
||||
|
||||
let output = ctx
|
||||
|
||||
@@ -45,8 +45,10 @@ where
|
||||
{
|
||||
fn if_exists(self) -> Option<Self> {
|
||||
if self.as_ref().exists() {
|
||||
debug!("Path {:?} exists", self.as_ref());
|
||||
Some(self)
|
||||
} else {
|
||||
debug!("Path {:?} doesn't exist", self.as_ref());
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user