Skip to content

Commit 8e0ceeb

Browse files
authored
Merge pull request from roadrunner-server/fix/path_separator
[#49]: fix: incorrect path separator parsing
2 parents 3b845f6 + b8f05e0 commit 8e0ceeb

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.github/workflows/linters.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ jobs:
1818
- name: Run linter
1919
uses: golangci/golangci-lint-action@v3.2.0 # Action page: <https://github.com/golangci/golangci-lint-action>
2020
with:
21-
version: v1.48 # without patch version
21+
version: v1.49 # without patch version
2222
only-new-issues: false # show only new issues if it's a pull request
2323
args: --timeout=10m --build-tags=race

github/repo.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ func (r *GHRepo) DownloadTemplate(version string) (string, error) { //nolint:goc
8181
_, _ = io.Copy(io.Discard, do.Body)
8282
_ = do.Body.Close()
8383

84+
// replace '/' in the branch name or tag with the '_' to prevent using '/' as a path separator
85+
version = strings.ReplaceAll(version, "/", "_")
86+
8487
tmp := os.TempDir()
8588
name := path.Join(tmp, "roadrunner-server-"+version)
8689
_ = os.RemoveAll(name)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ require (
3939
go.uber.org/multierr v1.8.0 // indirect
4040
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
4141
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
42-
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2 // indirect
42+
golang.org/x/sys v0.0.0-20220913120320-3275c407cedc // indirect
4343
golang.org/x/text v0.3.7 // indirect
4444
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
4545
google.golang.org/appengine v1.6.7 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
355355
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
356356
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
357357
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
358-
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2 h1:wM1k/lXfpc5HdkJJyW9GELpd8ERGdnh8sMGL6Gzq3Ho=
359-
golang.org/x/sys v0.0.0-20220909162455-aba9fc2a8ff2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
358+
golang.org/x/sys v0.0.0-20220913120320-3275c407cedc h1:dpclq5m2YrqPGStKmtw7IcNbKLfbIqKXvNxDJKdIKYc=
359+
golang.org/x/sys v0.0.0-20220913120320-3275c407cedc/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
360360
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
361361
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
362362
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

0 commit comments

Comments
 (0)