Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deno install command name including dot on Windows #4243

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

yuta0801
Copy link
Contributor

@yuta0801 yuta0801 commented Mar 4, 2020

The path.with_extension()'s arg expect just file extension not include dots like cmd
So passing extension starting with a dot, it returns a file path containing two dots like file..cmd
This means all commands installed with demo install end with a dot like command. on Windows

Current deno install behavior on Windows (log)

PS D:\> deno install --allow-net --allow-read file_server https://deno.land/std/http/file_server.ts
Download https://deno.land/std/http/file_server.ts
Compile https://deno.land/std/http/file_server.ts
Download https://deno.land/std/path/mod.ts
Download https://deno.land/std/http/server.ts
Download https://deno.land/std/flags/mod.ts
Download https://deno.land/std/testing/asserts.ts
Download https://deno.land/std/http/io.ts
Download https://deno.land/std/path/win32.ts
Download https://deno.land/std/path/posix.ts
Download https://deno.land/std/path/constants.ts
Download https://deno.land/std/path/constants.ts
Download https://deno.land/std/path/interface.ts
Download https://deno.land/std/path/glob.ts
Download https://deno.land/std/path/globrex.ts
Download https://deno.land/std/path/utils.ts
Download https://deno.land/std/fmt/colors.ts
Download https://deno.land/std/testing/diff.ts
Download https://deno.land/std/testing/format.ts
Download https://deno.land/std/io/bufio.ts
Download https://deno.land/std/util/async.ts
Download https://deno.land/std/strings/mod.ts
Download https://deno.land/std/io/util.ts
Download https://deno.land/std/strings/encode.ts
Download https://deno.land/std/strings/decode.ts
Download https://deno.land/std/strings/pad.ts
Download https://deno.land/std/textproto/mod.ts
Download https://deno.land/std/http/http_status.ts
✅ Successfully installed file_server
C:\Users\yuta\.deno\bin\file_server..cmd
PS D:\> file_server
file_server : The term 'file_server' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ file_server
+ ~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (file_server:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

PS D:> file_server.

D:>deno.exe "run" "--allow-read" "--allow-net" "https://deno.land/std/http/file_server.ts"
HTTP server listening on http:https://0.0.0.0:4500/
^C

PS D:> file_server..cmd
D:>deno.exe "run" "--allow-read" "--allow-net" "https://deno.land/std/http/file_server.ts"
HTTP server listening on http:https://0.0.0.0:4500/
^C

@CLAassistant
Copy link

CLAassistant commented Mar 4, 2020

CLA assistant check
All committers have signed the CLA.

@piscisaureus piscisaureus merged commit 5e7ca44 into denoland:master Mar 4, 2020
@piscisaureus
Copy link
Member

LGTM, thanks!

@yuta0801 yuta0801 deleted the extension branch March 5, 2020 04:44
dubiousjim added a commit to dubiousjim/deno that referenced this pull request Mar 5, 2020
* denoland/master: (22 commits)
  fix event target tests
  Support async function and EventListenerObject as listeners (denoland#4240)
  Allow BadResource errors to take a custom message (denoland#4251)
  Document TypeScript compiler options (denoland#4241)
  refactor: preliminary cleanup of Deno.runTests() (denoland#4237)
  refactor: cleanup compiler runtimes (denoland#4230)
  Use discord instead of gitter (denoland#4253)
  Remove unnecessary macro from cli/ops/tty.rs (denoland#4254)
  Remove Deno.errors.Other (denoland#4249)
  refactor: rewrite testPerm into unitTest (denoland#4231)
  Migrate internal bundles to System (denoland#4233)
  Fix inlining of lib.dom.iterable.d.ts. (denoland#4242)
  Fix `deno install` file name including extra dot on Windows (denoland#4243)
  assert build success for test plugin (denoland#4223)
  Disable flaky and broken tests (denoland#4239)
  add assertOps sanitizer in cli/js/ unit tests (denoland#4209)
  misc: reduce unnecesarry output in cli/js tests (denoland#4182)
  feat(std/node): add directory classes (denoland#4087)
  Do not convert exceptions to JSON and back (denoland#4214)
  Don't reset exception handle after calling ErrWithV8Handle::get_handle() (denoland#4214)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants