+
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# WSLGit Changelog

## [1.1.1] - 2022-03-22

### Fixed

- Use standard bash executable (#122)


## [1.1.0] - 2022-03-13

Expand Down Expand Up @@ -179,3 +185,4 @@
[1.0.0]: https://github.com/andy-5/wslgit/releases/tag/v1.0.0
[1.0.1]: https://github.com/andy-5/wslgit/releases/tag/v1.0.1
[1.1.0]: https://github.com/andy-5/wslgit/releases/tag/v1.1.0
[1.1.1]: https://github.com/andy-5/wslgit/releases/tag/v1.1.1
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wslgit"
version = "1.1.0"
version = "1.1.1"
authors = ["Andreas Riffnaller-Schiefer <andreas.schiefer@gmail.com>"]
license = "MIT"

Expand Down
12 changes: 7 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ mod wsl;

const VERSION: &'static str = env!("CARGO_PKG_VERSION");

const BASH_EXECUTABLE: &str = "/bin/bash";

static mut DOUBLE_DASH_FOUND: bool = false;

fn translate_path_to_unix(argument: String) -> String {
Expand Down Expand Up @@ -139,7 +141,7 @@ fn translate_path_to_win(line: &[u8]) -> Vec<u8> {
let echo_cmd = format!("echo -n \"{}\"", line);
let output = Command::new("wsl")
.arg("-e")
.arg("bash")
.arg(BASH_EXECUTABLE)
.arg("-c")
.arg(&echo_cmd)
.output()
Expand Down Expand Up @@ -279,7 +281,7 @@ fn main() {

// build the command arguments that are passed to wsl.exe
cmd_args.push("-e".to_string());
cmd_args.push("/usr/bin/bash".to_string());
cmd_args.push(BASH_EXECUTABLE.to_string());
if use_interactive_shell() {
cmd_args.push("-ic".to_string());
} else {
Expand Down Expand Up @@ -535,7 +537,7 @@ mod tests {
fn unix_to_win_path_trans() {
let check_wslpath = Command::new("wsl")
.arg("-e")
.arg("bash")
.arg(BASH_EXECUTABLE)
.arg("-c")
.arg("wslpath C:\\")
.output();
Expand All @@ -556,7 +558,7 @@ mod tests {
// (see https://github.com/microsoft/WSL/issues/4908)
Command::new("wsl")
.arg("-e")
.arg("bash")
.arg(BASH_EXECUTABLE)
.arg("-c")
.arg("touch '/tmp/wslgit test file'")
.output()
Expand All @@ -578,7 +580,7 @@ mod tests {
);
Command::new("wsl")
.arg("-e")
.arg("bash")
.arg(BASH_EXECUTABLE)
.arg("-c")
.arg("rm '/tmp/wslgit test file'")
.output()
Expand Down
2 changes: 1 addition & 1 deletion tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,6 @@ mod integration {
.args(&["log", "-1", "--pretty=format:$(printenv SHELL)"])
.assert()
.success()
.stdout(predicate::str::contains("/usr/bin/bash"));
.stdout(predicate::str::contains("/bin/bash"));
}
}
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载