Skip to content

Commit

Permalink
Merge branch 'develop' into remove-tzdata
Browse files Browse the repository at this point in the history
  • Loading branch information
fzipi authored Oct 30, 2022
2 parents 0a1b44b + e33ec86 commit ce338b8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches: [ main, develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [ main, develop ]
schedule:
- cron: '33 8 * * 4'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Sonar
on:
push:
branches: [ main ]
branches: [ main, develop ]

jobs:
sonar:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Test
on:
pull_request:
branches: [ main ]
branches: [ main, develop ]
types: [opened, synchronize, reopened]
push:
branches: [ main ]
branches: [ main, develop ]

jobs:
test:
Expand Down
14 changes: 14 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ func NewConfigFromFile(cfgFile string) error {
cfgFile = ".ftw.yaml"
}

_, err = os.Stat(cfgFile)
if err != nil { // file does not exist, so we try the home folder

var home string

home, err = os.UserHomeDir()
if err != nil { // home folder could not be retrieved
return err
}

cfgFile = home + "/.ftw.yaml"

}

_, err = os.Stat(cfgFile)
if err != nil { // file exists, so we read it looking for config values
return err
Expand Down

0 comments on commit ce338b8

Please sign in to comment.