forked from LaconicNetwork/kompose
Merge pull request #24 from janetkuo/single-file-bug
Fix the 'failed to write to file' error when --out is set
This commit is contained in:
commit
90dda5000b
@ -254,7 +254,6 @@ func createOutFile(out string) *os.File {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Fatalf("error opening file: %v", err)
|
logrus.Fatalf("error opening file: %v", err)
|
||||||
}
|
}
|
||||||
defer f.Close()
|
|
||||||
}
|
}
|
||||||
return f
|
return f
|
||||||
}
|
}
|
||||||
@ -595,6 +594,7 @@ func ProjectKuberConvert(p *project.Project, c *cli.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
f := createOutFile(outFile)
|
f := createOutFile(outFile)
|
||||||
|
defer f.Close()
|
||||||
|
|
||||||
var mServices map[string]api.Service = make(map[string]api.Service)
|
var mServices map[string]api.Service = make(map[string]api.Service)
|
||||||
var serviceLinks []string
|
var serviceLinks []string
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user