Skip to content

Commit

Permalink
save config data to shift.json on working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
razzkumar committed Oct 10, 2019
1 parent b6271e5 commit c6de886
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cli/internal/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package setup
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"

"github.com/AlecAivazis/survey/v2"
)
Expand Down Expand Up @@ -205,7 +207,12 @@ func Run() {

fmt.Println(string(projectRequestJSON))

// 1. Save json code here.
jsonData, _ := json.MarshalIndent(projectRequestJSON, "", " ")

currentDir, _ := os.Getwd()
fileName := currentDir + "/shift.json"

_ = ioutil.WriteFile(fileName, jsonData, 0644)

// 2. Run infrastructre code here and save to JSON again

Expand Down

0 comments on commit c6de886

Please sign in to comment.