Workiva / dpx

Apache License 2.0
1 stars 0 forks source link

Globally activate packages in a separate cache from the default pub cache #12

Open evanweible-wf opened 2 months ago

evanweible-wf commented 2 months ago

dpx uses dart pub global activate to globally install package before running them. Because of this, dpx has a side effect of mutating the user's global cache, which may be unexpected or at least unwanted.

It'd be ideal if dpx could use its own pub cache to install packages and run their executables, but it is not as simple as setting the PUB_CACHE environment variable because that variable would affect the subprocess that dpx starts when executing the package executable.

If we can find a way to leverage a separate pub cache for installing packages while still leveraging the default pub cache when running the command, then I think we can still make dpx commands work as expected without the side effect of mutating the user's default pub cache and their globally activated packages.