Skip to content

Commit 00ccf41

Browse files
authored
Merge pull request #123 from andy-5/develop
Release 1.1.1.
2 parents d2f627c + 5634b97 commit 00ccf41

5 files changed

Lines changed: 17 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# WSLGit Changelog
22

3+
## [1.1.1] - 2022-03-22
4+
5+
### Fixed
6+
7+
- Use standard bash executable (#122)
8+
39

410
## [1.1.0] - 2022-03-13
511

@@ -179,3 +185,4 @@
179185
[1.0.0]: https://github.com/andy-5/wslgit/releases/tag/v1.0.0
180186
[1.0.1]: https://github.com/andy-5/wslgit/releases/tag/v1.0.1
181187
[1.1.0]: https://github.com/andy-5/wslgit/releases/tag/v1.1.0
188+
[1.1.1]: https://github.com/andy-5/wslgit/releases/tag/v1.1.1

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wslgit"
3-
version = "1.1.0"
3+
version = "1.1.1"
44
authors = ["Andreas Riffnaller-Schiefer <andreas.schiefer@gmail.com>"]
55
license = "MIT"
66

src/main.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ mod wsl;
1515

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

18+
const BASH_EXECUTABLE: &str = "/bin/bash";
19+
1820
static mut DOUBLE_DASH_FOUND: bool = false;
1921

2022
fn translate_path_to_unix(argument: String) -> String {
@@ -139,7 +141,7 @@ fn translate_path_to_win(line: &[u8]) -> Vec<u8> {
139141
let echo_cmd = format!("echo -n \"{}\"", line);
140142
let output = Command::new("wsl")
141143
.arg("-e")
142-
.arg("bash")
144+
.arg(BASH_EXECUTABLE)
143145
.arg("-c")
144146
.arg(&echo_cmd)
145147
.output()
@@ -279,7 +281,7 @@ fn main() {
279281

280282
// build the command arguments that are passed to wsl.exe
281283
cmd_args.push("-e".to_string());
282-
cmd_args.push("/usr/bin/bash".to_string());
284+
cmd_args.push(BASH_EXECUTABLE.to_string());
283285
if use_interactive_shell() {
284286
cmd_args.push("-ic".to_string());
285287
} else {
@@ -535,7 +537,7 @@ mod tests {
535537
fn unix_to_win_path_trans() {
536538
let check_wslpath = Command::new("wsl")
537539
.arg("-e")
538-
.arg("bash")
540+
.arg(BASH_EXECUTABLE)
539541
.arg("-c")
540542
.arg("wslpath C:\\")
541543
.output();
@@ -556,7 +558,7 @@ mod tests {
556558
// (see https://github.com/microsoft/WSL/issues/4908)
557559
Command::new("wsl")
558560
.arg("-e")
559-
.arg("bash")
561+
.arg(BASH_EXECUTABLE)
560562
.arg("-c")
561563
.arg("touch '/tmp/wslgit test file'")
562564
.output()
@@ -578,7 +580,7 @@ mod tests {
578580
);
579581
Command::new("wsl")
580582
.arg("-e")
581-
.arg("bash")
583+
.arg(BASH_EXECUTABLE)
582584
.arg("-c")
583585
.arg("rm '/tmp/wslgit test file'")
584586
.output()

tests/integration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,6 @@ mod integration {
286286
.args(&["log", "-1", "--pretty=format:$(printenv SHELL)"])
287287
.assert()
288288
.success()
289-
.stdout(predicate::str::contains("/usr/bin/bash"));
289+
.stdout(predicate::str::contains("/bin/bash"));
290290
}
291291
}

0 commit comments

Comments
 (0)