4 ms·
> Or the permissions. Why does my text processing app need to access the web? Again, seems like a good idea. But now the behavior of your standard library is ti
by searchableguy 5y ago
> Or the permissions. Why does my text processing app need to access the web? Again, seems like a good idea. But now the behavior of your standard library is tied to cli options. Phone apps make this work, but they request permissions, you don't explicitly say, "Open Maps with internet access". Ideally I'd like my code not to behave too differently just because it's in a different environment. I want to believe, I see a world where this all comes together smoothly, but it's tough to trust right now.
If I'm understanding you correctly, you don't want to run the code with correct flags and instead, have deno figure it out like a browser where it prompts the user to ask if they would like to give a certain permission.
If yes, that is already the case with deno. You can pass --prompt flag.
- tinalumfoil 5y agoNot quite. Prompting works in a user applications but let's say I launch my app from a systemd service so there's nobody to respond to those prompts. It's not that I don't want to run it with the correct flags. I do want that. Things is, if I run it with too few flags the program breaks. Hopefully in a way where it's obvious what happened! If I run it with too many, I lose the security benefit Deno gives. But the last thing I want is my whole service to fail because I forgot to add that one darned cli flag to my service file! And, I admit, maybe this is a non-issue. Maybe I can just check I'm in the right environment at program start. But it's one of those things where I don't feel like I fully grasp the implications.