Skip to content

Commit

Permalink
fixup windows
Browse files Browse the repository at this point in the history
  • Loading branch information
EverlastingBugstopper committed Mar 4, 2021
1 parent bd895bc commit 95f3b53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
11 changes: 5 additions & 6 deletions installers/binstall/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@ pub(crate) fn get_home_dir_path() -> Result<Utf8PathBuf, InstallerError> {

#[cfg(test)]
mod tests {
use super::Installer;
use assert_fs::TempDir;
use serial_test::serial;

use camino::Utf8PathBuf;

#[cfg(not(windows))]
#[test]
#[serial]
fn install_bins_creates_rover_home() {
use super::Installer;
use assert_fs::TempDir;
use serial_test::serial;

use camino::Utf8PathBuf;
let fixture = TempDir::new().unwrap();
let base_dir = Utf8PathBuf::from_path_buf(fixture.path().to_path_buf()).unwrap();
let install_path = Installer {
Expand Down
6 changes: 1 addition & 5 deletions installers/binstall/src/system/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ use std::io;
/// Adds the downloaded binary in Installer to a Windows PATH
pub fn add_binary_to_path(installer: &Installer) -> Result<(), InstallerError> {
let windows_path = get_windows_path_var()?;
let bin_path = installer
.get_bin_dir_path()?
.to_str()
.ok_or(InstallerError::PathNotUnicode)?
.to_string();
let bin_path = installer.get_bin_dir_path()?.to_string();
if let Some(old_path) = windows_path {
if let Some(new_path) = add_to_path(&old_path, &bin_path) {
apply_new_path(&new_path)?;
Expand Down
3 changes: 0 additions & 3 deletions installers/npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 95f3b53

Please sign in to comment.