mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
Fix deno install
file name including extra dot on Windows (#4243)
This commit is contained in:
parent
6f5dff371e
commit
5e7ca445ff
2 changed files with 8 additions and 8 deletions
|
@ -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());
|
||||
|
||||
|
|
|
@ -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" };
|
||||
|
|
Loading…
Add table
Reference in a new issue