Skip to content

Commit

Permalink
upstream_wrapper: Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
kolloch committed Jun 20, 2024
1 parent c99007b commit 634edee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/upstream_wrapper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ bazel run @rules_rust//tools/upstream_wrapper:rustfmt
```

Alternatively, look at the [bazel_env example](../../examples/bazel_env/)
to include them in the users path with direnv.
to include them in the users path with direnv.
6 changes: 4 additions & 2 deletions tools/upstream_wrapper/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::ffi::OsString;
use std::path::PathBuf;
use std::process::{exit, Command};
use std::ffi::OsString;

const WRAPPED_TOOL_NAME: &str = env!("WRAPPED_TOOL_NAME");
const WRAPPED_TOOL_TARGET: &str = env!("WRAPPED_TOOL_TARGET");
Expand All @@ -21,7 +21,9 @@ fn main() {
);
}

let tool_directory = wrapped_tool_path.parent().expect("parent directory of tool binary");
let tool_directory = wrapped_tool_path
.parent()
.expect("parent directory of tool binary");
let old_path = std::env::var_os("PATH").unwrap_or_default();
let mut new_path = OsString::from(tool_directory);
new_path.push(PATH_SEPARATOR);
Expand Down

0 comments on commit 634edee

Please sign in to comment.