Skip to content

Commit

Permalink
Merge pull request #736 from kmpm/fix/escape_more
Browse files Browse the repository at this point in the history
quote StoreDir and reuse new escape filter
  • Loading branch information
ripienaar authored Mar 20, 2023
2 parents bcc57a2 + 6c7e4b4 commit e6d2b3a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cli/server_run_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ logtime: false
{{- if .JetStream }}
jetstream {
store_dir: {{ .StoreDir }}
store_dir: "{{ .StoreDir | escape }}"
{{- if .JSDomain }}
domain: {{ .JSDomain }}
{{- end }}
Expand Down Expand Up @@ -258,10 +258,7 @@ func (c *SrvRunCmd) prepareConfig() error {
return err
}
c.config.StoreDir = filepath.Join(parent, "nats", c.config.Name)
if runtime.GOOS == "windows" {
// escape path separator in file
c.config.StoreDir = strings.ReplaceAll(c.config.StoreDir, "\\", "\\\\")
}

if c.config.ExtendWithContext || c.config.ExtendDemoNetwork {
c.config.JSDomain = strings.ToUpper(c.config.Name)
}
Expand Down

0 comments on commit e6d2b3a

Please sign in to comment.