Skip to content
This repository was archived by the owner on Dec 17, 2024. It is now read-only.

Commit 8e46bea

Browse files
authored
Merge pull request #296 from vania-pooh/master
Always creating config dir
2 parents fdb408c + 8cd24c0 commit 8e46bea

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- name: Setup Golang
1515
uses: actions/setup-go@v2
1616
with:
17-
go-version: 1.15.x
17+
go-version: 1.16.x
1818

1919
- uses: actions/cache@v1
2020
with:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Setup Golang
1414
uses: actions/setup-go@v2
1515
with:
16-
go-version: 1.15.x
16+
go-version: 1.16.x
1717

1818
- uses: actions/cache@v1
1919
with:

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- name: Setup Golang
1313
uses: actions/setup-go@v2
1414
with:
15-
go-version: 1.15.x
15+
go-version: 1.16.x
1616

1717
- uses: actions/cache@v1
1818
with:

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/aerokube/cm
22

3-
go 1.15
3+
go 1.16
44

55
require (
66
github.com/Masterminds/semver/v3 v3.0.1

selenoid/docker.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ func (c *DockerConfigurator) IsConfigured() bool {
325325
}
326326

327327
func (c *DockerConfigurator) Configure() (*SelenoidConfig, error) {
328+
err := c.createConfigDir()
329+
if err != nil {
330+
return nil, fmt.Errorf("failed to create output directory: %v", err)
331+
}
328332
if c.BrowsersJson != "" {
329333
return c.syncWithConfig()
330334
}
@@ -334,10 +338,6 @@ func (c *DockerConfigurator) Configure() (*SelenoidConfig, error) {
334338
if err != nil {
335339
return nil, fmt.Errorf("failed to marshal json: %v", err)
336340
}
337-
err = c.createConfigDir()
338-
if err != nil {
339-
return nil, fmt.Errorf("failed to create output directory: %v", err)
340-
}
341341
return &cfg, ioutil.WriteFile(getSelenoidConfigPath(c.ConfigDir), data, 0644)
342342
}
343343

0 commit comments

Comments
 (0)