dsherret / dax

Cross-platform shell tools for Deno and Node.js inspired by zx.
MIT License
1.05k stars 35 forks source link

Attempt to still resolve commands when there’s no PATH env var #64

Open dsherret opened 1 year ago

dsherret commented 1 year ago

Someone may be using this and not want to grant env var permissions (even though --allow-run is effectively --allow-all). It should still attempt to resolve commands in that scenario.

joehillen commented 8 months ago

I dont think that's a good idea. It means the program would ignore PATH which is not good. I think at the very least dax should require --allow-env=PATH

balupton commented 7 months ago

Agree that --allow-env=PATH is the way to go.

configuring PATH is complicated, eg. this is all the resolution necessary for a cross-compatible PATH, taken from Dorothy: https://github.com/bevry/dorothy/blob/master/commands/setup-environment-commands