summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryuta0801 <yuta030801@gmail.com>2020-03-04 17:40:56 +0900
committerGitHub <noreply@github.com>2020-03-04 00:40:56 -0800
commit5e7ca445ff3415ab12170a7fb133a0f80147ed41 (patch)
tree85bbf20679e90a1a615aa6d732ce716b82914a35
parent6f5dff371e7ede8dec02054eff28dc51b0fcee7b (diff)
Fix `deno install` file name including extra dot on Windows (#4243)
-rw-r--r--cli/installer.rs12
-rw-r--r--cli/tests/integration_tests.rs4
2 files changed, 8 insertions, 8 deletions
diff --git a/cli/installer.rs b/cli/installer.rs
index d5b6a0424..b4094bea4 100644
--- a/cli/installer.rs
+++ b/cli/installer.rs
@@ -143,7 +143,7 @@ pub fn install(
let mut file_path = installation_dir.join(exec_name);
if cfg!(windows) {
- file_path = file_path.with_extension(".cmd");
+ file_path = file_path.with_extension("cmd");
}
if file_path.exists() && !force {
@@ -229,7 +229,7 @@ mod tests {
let mut file_path = temp_dir.path().join(".deno/bin/echo_test");
if cfg!(windows) {
- file_path = file_path.with_extension(".cmd");
+ file_path = file_path.with_extension("cmd");
}
assert!(file_path.exists());
@@ -263,7 +263,7 @@ mod tests {
let mut file_path = temp_dir.path().join("echo_test");
if cfg!(windows) {
- file_path = file_path.with_extension(".cmd");
+ file_path = file_path.with_extension("cmd");
}
assert!(file_path.exists());
@@ -292,7 +292,7 @@ mod tests {
let mut file_path = temp_dir.path().join("echo_test");
if cfg!(windows) {
- file_path = file_path.with_extension(".cmd");
+ file_path = file_path.with_extension("cmd");
}
assert!(file_path.exists());
@@ -319,7 +319,7 @@ mod tests {
let mut file_path = temp_dir.path().join("echo_test");
if cfg!(windows) {
- file_path = file_path.with_extension(".cmd");
+ file_path = file_path.with_extension("cmd");
}
assert!(file_path.exists());
@@ -343,7 +343,7 @@ mod tests {
let mut file_path = temp_dir.path().join("echo_test");
if cfg!(windows) {
- file_path = file_path.with_extension(".cmd");
+ file_path = file_path.with_extension("cmd");
}
assert!(file_path.exists());
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index f6319ea81..6c853f089 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -189,7 +189,7 @@ fn installer_test_local_module_run() {
.expect("Failed to install");
let mut file_path = temp_dir.path().join("echo_test");
if cfg!(windows) {
- file_path = file_path.with_extension(".cmd");
+ file_path = file_path.with_extension("cmd");
}
assert!(file_path.exists());
let path_var_name = if cfg!(windows) { "Path" } else { "PATH" };
@@ -237,7 +237,7 @@ fn installer_test_remote_module_run() {
.expect("Failed to install");
let mut file_path = temp_dir.path().join("echo_test");
if cfg!(windows) {
- file_path = file_path.with_extension(".cmd");
+ file_path = file_path.with_extension("cmd");
}
assert!(file_path.exists());
let path_var_name = if cfg!(windows) { "Path" } else { "PATH" };