Skip to content

Commit

Permalink
Do not trim quotes in findDirectivesInScriptCommand (ddev#3051)
Browse files Browse the repository at this point in the history
In 2ff4f0b, triming was added for readability of file paths but the code
does not actually depend on quotes around paths. It only cares for
commas to differentiate multiple paths in a given directive.

This partially reverts:
    commit 2ff4f0b
    Author: Andreas Hager <3351175+andreashager@users.noreply.github.com>
    Date:   Tue Dec 29 05:47:40 2020 +0100

        Create new HeidiSQL command for Windows and WSL2 (ddev#2679)
  • Loading branch information
diegoe committed Jun 17, 2021
1 parent 235ff4b commit 19d5b31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/ddev/cmd/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func findDirectivesInScriptCommand(script string) map[string]string {
if strings.HasPrefix(line, "## ") && strings.Contains(line, ":") {
line = strings.Replace(line, "## ", "", 1)
parts := strings.SplitN(line, ":", 2)
parts[1] = strings.Trim(parts[1], " \"'")
parts[1] = strings.Trim(parts[1], " ")
directives[parts[0]] = parts[1]
}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/ddev/cmd/global_dotddev_assets/commands/host/heidisql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## Usage: heidisql
## Example: "ddev heidisql"
## OSTypes: windows,wsl2
## HostBinaryExists: "/mnt/c/Program Files/HeidiSQL/heidisql.exe,C:\Program Files\HeidiSQL\Heidisql.exe"
## HostBinaryExists: /mnt/c/Program Files/HeidiSQL/heidisql.exe,C:\Program Files\HeidiSQL\Heidisql.exe

arguments="--host=127.0.0.1 --port=${DDEV_HOST_DB_PORT} --user=root --password=root --description=${DDEV_SITENAME}"

Expand Down

0 comments on commit 19d5b31

Please sign in to comment.