Skip to content

Commit 26656d8

Browse files
Fix issues with first install
1 parent 8ef773c commit 26656d8

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

cmd/run.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,15 @@ var runCmd = &cobra.Command{
3939
Run: func(cmd *cobra.Command, args []string) {
4040
var err error
4141
dst := args[0]
42-
4342
fmt.Println("Running configuration from: ", dst)
4443
fmt.Println("")
4544

4645
// create a logger
4746
log := createLogger()
4847

48+
// create the shipyard home
49+
os.MkdirAll(ShipyardHome(), os.FileMode(0755))
50+
4951
if !IsLocalFolder(dst) {
5052
// fetch the remote server from github
5153
dst, err = pullRemoteBlueprint(dst)
@@ -84,6 +86,13 @@ var runCmd = &cobra.Command{
8486
return
8587
}
8688

89+
// create the state directory
90+
err = os.MkdirAll(StateDir(), 0755)
91+
if err != nil {
92+
log.Error("Unable to create state folder", "error", err)
93+
return
94+
}
95+
8796
// copy the blueprints to our state folder
8897
// this is temporary
8998
err = copy.Copy(dst, StateDir())

pkg/providers/cluster_k3s.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ func (c *Cluster) copyKubeConfig(id string) (string, error) {
236236

237237
func (c *Cluster) createDockerKubeConfig(kubeconfig string) error {
238238
// read the config into a string
239-
f, err := os.OpenFile(kubeconfig, os.O_RDONLY, 0755)
239+
f, err := os.OpenFile(kubeconfig, os.O_RDONLY, 0666)
240240
if err != nil {
241241
return err
242242
}

0 commit comments

Comments
 (0)