mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-28 09:44:08 -04:00
Restructure config and constants
This commit is contained in:
parent
66bb632a69
commit
1a9b33d738
18 changed files with 134 additions and 112 deletions
|
@ -16,6 +16,7 @@ import (
|
|||
depl "github.com/edgelesssys/constellation/debugd/debugd/deploy"
|
||||
pb "github.com/edgelesssys/constellation/debugd/service"
|
||||
"github.com/edgelesssys/constellation/debugd/ssh"
|
||||
"github.com/edgelesssys/constellation/internal/constants"
|
||||
statec "github.com/edgelesssys/constellation/internal/state"
|
||||
"github.com/spf13/afero"
|
||||
"github.com/spf13/cobra"
|
||||
|
@ -66,7 +67,7 @@ func deploy(cmd *cobra.Command, fileHandler file.Handler, config *config.CDBGCon
|
|||
ips = overrideIPs
|
||||
} else {
|
||||
var stat statec.ConstellationState
|
||||
err := fileHandler.ReadJSON(*config.StatePath, &stat)
|
||||
err := fileHandler.ReadJSON(constants.StateFilename, &stat)
|
||||
if errors.Is(err, fs.ErrNotExist) {
|
||||
log.Println("Unable to load statefile. Maybe you forgot to run \"constellation create ...\" first?")
|
||||
return fmt.Errorf("loading statefile failed: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue