wrangler-action icon indicating copy to clipboard operation
wrangler-action copied to clipboard

Wrangler is reinstalled even when it's already available

Open 1000hz opened this issue 1 year ago • 11 comments

Currently, wrangler-action always installs wrangler as specified by the wranglerVersion input or the DEFAULT_WRANGLER_VERSION constant contained in the source. This isn't always necessary as Wrangler may have already been installed in a previous step of the workflow (e.g. if it's declared in the project's dependencies in package.json). This also makes it harder to keep the version of Wrangler used by wrangler-action and the version used locally consistent, as the user needs to manually keep wranglerVersion and package.json in sync.

Instead, we should only install Wrangler if it's not already present in the $PATH (including the package manager bin directory) OR if wranglerVersion has been explicitly provided

1000hz avatar Oct 17 '23 17:10 1000hz