Skip to content

Commit

Permalink
Merge pull request #100 from containerum/chkit-v3
Browse files Browse the repository at this point in the history
Chkit v3
  • Loading branch information
MargoTuleninova authored May 23, 2018
2 parents dafddd6 + 941e88c commit 2ea8c12
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ PUBLIC_KEY_FILE:=pubkey.pem
COMMIT_HASH=$(shell git rev-parse --short HEAD 2>/dev/null)
BUILD_DATE=$(shell date +%FT%T%Z)
LATEST_TAG=$(shell git describe --tags $(shell git rev-list --tags --max-count=1))
#CONTAINERUM_API?=https://api.containerum.io:8082
CONTAINERUM_API?=https://api.containerum.io:8082
VERSION?=$(LATEST_TAG:v%=%)

# make directory and store path to variable
Expand Down
2 changes: 1 addition & 1 deletion pkg/configdir/config_dir.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func init() {
file, err := os.OpenFile(pathToConfigFile, os.O_CREATE, 0600)
switch {
case err == nil || os.IsExist(err):
file.Chmod(0600)
os.Chmod(file.Name(), 0600)
file.Close()
default:
panic(ErrUnableToCreateConfigFile.Wrap(err))
Expand Down
2 changes: 1 addition & 1 deletion pkg/configuration/tokens.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func SaveTokens(ctx *context.Context, tokens model.Tokens) error {
if err != nil {
return err
}
if err := file.Chmod(0600); err != nil {
if err := os.Chmod(file.Name(), 0600); err != nil {
return err
}
encoder := json.NewEncoder(file)
Expand Down

0 comments on commit 2ea8c12

Please sign in to comment.