You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to do something that I'm not sure is supported in Deno and I am wondering if I missed a feature or if there is a possible improvement to Deno.
What
I'm trying to write a CLI tool that's supposed to have access to a single folder on the user's machine. The idea:
the whole configuration/assets live in a single folder (meaning, copy/pasting this folder replicates the whole behavior of the tool)
the tool can only read/write to that folder and no other
it asks for minimal permissions
So, for example, if a user wants to install my tool in /home/me/forge, I'd like them to be able to install it with deno install --allow-read=/home/me/forge AND I'd like my script to know where that folder is.
How
I have tried the options below:
read the folders the tool is allowed to read at runtime => not possible (probably security reasons?)
put the configuration (containing the folder path) in HOME => requires allow-env, breaks #1, two-step installation
inject the project folder at installation => deno install currently can't do that, I'd have to write a wrapping installation script. Seems convoluted and does not inspire trust
From my perspective, this looks like a use-case others might run into and it would be nice to have it supported by Deno It would probably best be solved at installation (new capabilities in deno install?).
This discussion was converted from issue #8754 on December 14, 2020 09:45.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi guys,
I'm trying to do something that I'm not sure is supported in Deno and I am wondering if I missed a feature or if there is a possible improvement to Deno.
What
I'm trying to write a CLI tool that's supposed to have access to a single folder on the user's machine. The idea:
So, for example, if a user wants to install my tool in
/home/me/forge
, I'd like them to be able to install it withdeno install --allow-read=/home/me/forge
AND I'd like my script to know where that folder is.How
I have tried the options below:
allow-env
, breaks#1
, two-step installationdeno install
currently can't do that, I'd have to write a wrapping installation script. Seems convoluted and does not inspire trustFrom my perspective, this looks like a use-case others might run into and it would be nice to have it supported by Deno It would probably best be solved at installation (new capabilities in
deno install
?).WDYT? Any solution I missed?
Beta Was this translation helpful? Give feedback.
All reactions