mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Support installing to folders with whitespace and fix pluginUrl trailing and leading whitespace failures (#32506)
* Plugins: Support installing to folders with whitespace and fix pluginUrl trailing and leading whitespace failures * update docs * update docs
This commit is contained in:
@@ -42,8 +42,8 @@ RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
|
||||
IFS=$OLDIFS; \
|
||||
if expr match "$plugin" '.*\;.*'; then \
|
||||
pluginUrl=$(echo "$plugin" | cut -d';' -f 1); \
|
||||
pluginWithoutUrl=$(echo "$plugin" | cut -d';' -f 2); \
|
||||
grafana-cli --pluginUrl "${pluginUrl}" --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${pluginWithoutUrl}; \
|
||||
pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2); \
|
||||
grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"; \
|
||||
else \
|
||||
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}; \
|
||||
fi \
|
||||
|
||||
@@ -46,8 +46,8 @@ RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
|
||||
IFS=$OLDIFS; \
|
||||
if expr match "$plugin" '.*\;.*'; then \
|
||||
pluginUrl=$(echo "$plugin" | cut -d';' -f 1); \
|
||||
pluginWithoutUrl=$(echo "$plugin" | cut -d';' -f 2); \
|
||||
grafana-cli --pluginUrl "${pluginUrl}" --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${pluginWithoutUrl}; \
|
||||
pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2); \
|
||||
grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"; \
|
||||
else \
|
||||
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}; \
|
||||
fi \
|
||||
|
||||
@@ -69,8 +69,8 @@ if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then
|
||||
IFS=$OLDIFS
|
||||
if [[ $plugin =~ .*\;.* ]]; then
|
||||
pluginUrl=$(echo "$plugin" | cut -d';' -f 1)
|
||||
pluginWithoutUrl=$(echo "$plugin" | cut -d';' -f 2)
|
||||
grafana-cli --pluginUrl "${pluginUrl}" --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${pluginWithoutUrl}
|
||||
pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2)
|
||||
grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"
|
||||
else
|
||||
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user