Skip to content

Commit

Permalink
fix: 修复安装命令和符号链接的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Mar 30, 2024
1 parent a3d9fcb commit b69ca9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/command_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ pub async fn install(
.map(|s| s.trim_start().to_owned())
.collect::<Vec<String>>()
.join("\n")
.as_str()
.as_bytes(),
)?;
formula_file.write_all(package_formula.get_file_content().as_bytes())?;
Expand Down
4 changes: 2 additions & 2 deletions src/symlink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub fn symlink(src: &Path, dest: &Path, package_name: &str) -> Result<(), Report
.replace("{filepath}", &src_file_path)
.replace("{package}", package_name);

bat_file.write_all(bat_script.as_str().as_bytes())?;
bat_file.write_all(bat_script.as_bytes())?;
}

// generate a shell
Expand All @@ -64,7 +64,7 @@ pub fn symlink(src: &Path, dest: &Path, package_name: &str) -> Result<(), Report
.replace("{package}", package_name)
.replace("\r\n", "\n");

shell_file.write_all(bat_script.as_str().as_bytes())?;
shell_file.write_all(bat_script.as_bytes())?;
}
}

Expand Down

0 comments on commit b69ca9d

Please sign in to comment.