Skip to content

Commit

Permalink
Merge pull request #91 from canonical/make-environment
Browse files Browse the repository at this point in the history
Set PATH environment variable in make command
  • Loading branch information
jawn-smith committed Oct 19, 2022
2 parents 318d3d6 + 10c3ff5 commit c4d1265
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/statemachine/classic_states.go
Expand Up @@ -339,10 +339,13 @@ func (stateMachine *StateMachine) buildGadgetTree() error {

// now run "make" to build the gadget tree
makeCmd := execCommand("make")
// add ARCH and SERIES environment variables for making the gadget tree
makeCmd.Env = append(makeCmd.Env, []string{
fmt.Sprintf("ARCH=%s", classicStateMachine.ImageDef.Architecture),
fmt.Sprintf("SERIES=%s", classicStateMachine.ImageDef.Series),
}...)
// add the current ENV to the command
makeCmd.Env = append(makeCmd.Env, os.Environ()...)
makeCmd.Dir = sourceDir

makeOutput := helper.SetCommandOutput(makeCmd, classicStateMachine.commonFlags.Debug)
Expand Down

0 comments on commit c4d1265

Please sign in to comment.