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

wasm-pack-init (1).exe does not show init instructions #518

Closed
Mblkolo opened this issue Jan 19, 2019 · 7 comments · Fixed by #550
Closed

wasm-pack-init (1).exe does not show init instructions #518

Mblkolo opened this issue Jan 19, 2019 · 7 comments · Fixed by #550
Assignees
Milestone

Comments

@Mblkolo
Copy link

Mblkolo commented Jan 19, 2019

When i download new version wasm-pack, my browser saved it as wasm-pack-init (1).exe.

wasm-pack-init (1).exe does not show init instructions and work as wasm-pack.exe

Maybe run all the files with name start from "wasm-pack-init" as init-file?

@ashleygwilliams
Copy link
Member

@Mblkolo can you say more about how you are installing wasm-pack? i believe that the installer script should replace previous versions (which should avoid the (1)) extension it seems you are receiving. i certainly agree that we should solve this issue, but i am also curious about how you found yourself in this situation so we can also help folks avoid it! thanks for filing!

@Mblkolo
Copy link
Author

Mblkolo commented Jan 21, 2019

@ashleygwilliams, i download https://github.com/rustwasm/wasm-pack/releases/download/v0.5.1/wasm-pack-init.exe

after few day i download latest version https://github.com/rustwasm/wasm-pack/releases/download/v0.6.0/wasm-pack-init.exe

It look like this in my chrome browser:
image

I reproduction this issue with powershell commands:

PS C:\Download> ls

Каталог: C:\Download

Mode LastWriteTime Length Name


-a---- 21.01.2019 23:37 5094912 wasm-pack-init (1).exe
-a---- 21.01.2019 23:34 4732928 wasm-pack-init.exe

PS C:\Download> & '.\wasm-pack-init.exe'
info: existing wasm-pack installation found at C:\Users\Mblkolo\.cargo\bin\wasm-pack.exe
info: would you like to overwrite this file? [y/N]: N
aborting installation
Press enter to close this window...

PS C:\Download> & '.\wasm-pack-init (1).exe'
wasm-pack-init-(1).exe 0.6.0
Ashley Williams [email protected]
📦 ✨ pack and publish your wasm!

USAGE:
wasm-pack-init (1).exe [FLAGS]

FLAGS:
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose Log verbosity is based off the number of v used

SUBCOMMANDS:
build 🏗️ build your npm package!
help Prints this message or the help of the given subcommand(s)
login 👤 Add a registry user account! (aliases: adduser, add-user)
pack 🍱 create a tar of your npm package but don't publish!
publish 🎆 pack up your npm package and publish!
test 👩‍🔬 test your wasm!
PS C:\Download> & '.\wasm-pack-init (1).exe' -V
wasm-pack-init-(1).exe 0.6.0

PS C:\Download> rm wasm-pack-init.exe
PS C:\Download> move '.\wasm-pack-init (1).exe' wasm-pack-init.exe
PS C:\Download> & '.\wasm-pack-init.exe'
info: existing wasm-pack installation found at C:\Users\Mog\.cargo\bin\wasm-pack.exe
info: would you like to overwrite this file? [y/N]: N
aborting installation
Press enter to close this window...

@danwilhelm
Copy link
Member

danwilhelm commented Jan 22, 2019

I have also noticed this issue.

If "x.exe" is downloaded twice, the second download is saved as "x (1).exe" in Chrome and "x(1).exe" in Firefox.

In both cases, the EXE stem is not exactly "wasm-pack-init". So, due to this line, the installer script is not run.

@ashleygwilliams
Copy link
Member

@Mblkolo @danwilhelm out of curiosity...

info: would you like to overwrite this file? [y/N]: N

i'm curious why you didn't choose Y? if Y is chosen it will overwrite and not append the (1) to the file name. i think we expect this to be the default user behavior. i'd love to understand why you chose N so we can improve the installer!

@Mblkolo
Copy link
Author

Mblkolo commented Jan 24, 2019

@ashleygwilliams, you misunderstood me. Sorry my english.

With the script, I just demonstrated that the wasm-pack-init (1).exe does not run in install mode. Until I rename it to wasm-pack-init.exe.

I solved this problem for me and updated the wasm-pack even before writing this issue.

See #518 (comment) , to solve problem for all.

@danwilhelm
Copy link
Member

@ashleygwilliams As @Mblkolo said, the issue is that the installer code often doesn't run.

There are many reasonable cases where the downloaded file is not named exactly wasm-pack-init.exe. In those cases, the installer routine does not run.

@Mblkolo suggested to change this line to test whether the filename begins with wasm-pack-init rather than exactly is it.

@ashleygwilliams
Copy link
Member

@danwilhelm or @Mblkolo - i've started a branch in #550 with a solution to this- i'm not entirely sure what if any way we should test it- could one of you test it manually for now and/or leave your comments on the PR? thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants