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
Currently,
wrangler-actionalways installs wrangler as specified by thewranglerVersioninput or theDEFAULT_WRANGLER_VERSIONconstant 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 inpackage.json). This also makes it harder to keep the version of Wrangler used bywrangler-actionand the version used locally consistent, as the user needs to manually keepwranglerVersionandpackage.jsonin sync.Instead, we should only install Wrangler if it's not already present in the
$PATH(including the package manager bin directory) OR ifwranglerVersionhas been explicitly provided