-
Notifications
You must be signed in to change notification settings - Fork 621
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
feat: installer #489
feat: installer #489
Conversation
Current status:
20:07 $ deno -A ./installer/mod.ts https://deno.land/std/http/file_server.ts
[1/1] Compiling file:///Users/biwanczuk/dev/deno_std/installer/mod.ts
⚠️ file_server is already installed, do you want to overwrite it? [yN]
y
Downloading: https://deno.land/std/http/file_server.ts
ℹ️ Detected shebang:
#!/usr/bin/env deno --allow-net
Requested permissions:
--allow-net
⚠️ Grant? [yN]
y
✅ Successfully installed file_server.
ℹ️ Add ~/.deno/bin to PATH
echo 'export PATH="$HOME/.deno/bin:$PATH"' >> ~/.bashrc # change this to your shell |
How does a program request permissions? |
Not sure what you mean |
I mean if a user installs something like this
Then there is no prompt necessary because the user has already explicitly given permission. So I don't understand when |
Ooh it's based on the shebang? Can we omit this feature for V1 ? shebang is quite unix specific, and it seems strange that it would have meaning on windows. |
Yes, @syumai implemented it.
Sure, I wasn't sure about it anyway. |
@ry this should be ready for another review - I haven't tested it on Windows |
|
EXE_NAME Name for executable | ||
SCRIPT_URL Local or remote URL of script to install | ||
[FLAGS...] List of flags for script, both Deno permission and script specific flag can be used. | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems when I run it with no arguments, there's no error message or help text:
~/src/deno_std> deno -A installer/deno_installer.ts
[1/1] Compiling file:///Users/rld/src/deno_std/installer/deno_installer.ts
~/src/deno_std>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yikes, can we just drop installer/deno_installer.ts
and leave installer/mod.ts
?
Removed installer/deno_installer.ts
it's not needed anymore - previously it was discovering module name from path, but now it's explicitly passed as an arg.
Please try deno -A installer/mod.ts
Cool. It's working for me. So this doesn't need to be solved now, but something to think about. I did this:
That worked correctly. But now I want to perhaps re-download the file_server2 program. I want to be able to do
and have it operate as if I did
but due to the placement of |
@ry yep, I know about this caveat, but haven't figured it out yet. |
I mean it would be nice if for all deno programs, the argument ordering wasn't so necessary. It would be great if you could do "deno https://deno.land/std/http/file_server.ts --reload" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks @bartlomieju and @syumai
Is there any other changes you want to make before landing?
I'll see what we can do about that.
I added |
LGTM to me too. Thanks @bartlomieju and @ry ! |
Closes #471
This PR builds on #488 by @syumai
I've managed to remove call to
wget